'Flutter won't compile a release build of my app?
After working on this app I tried to build my app to iOS using the flutter run --release
command. But whenever I do I get this error *Could not build the precompiled application for the device.*
I've tried flutter clean
then flutter upgrade
. I've switched flutter branches. I'm so lost on this one!
Here's the terminal output:
Building com.example.projectqr for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: HRCH36A6AR
Running pod install... 872ms
Running Xcode build...
Xcode build done. 3.7s
Failed to build iOS app
Error output from Xcode build:
↳
objc[9606]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1fde65eb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1085f84f8).
One of the two will be used. Which one is undefined.
objc[9606]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1fde65f00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
(0x1085f8548). One of the two will be used. Which one is undefined.
objc[9606]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1fde65f50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice
(0x1085f8598). One of the two will be used. Which one is undefined.
objc[9606]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x1fde65fa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1085f85e8). One of
the two will be used. Which one is undefined.
objc[9606]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x1fde65ff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1085f8638).
One of the two will be used. Which one is undefined.
objc[9606]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x1fde66040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1085f8688). One of
the two will be used. Which one is undefined.
2022-04-26 18:57:12.964 xcodebuild[9606:80050] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in
com.apple.dt.IDEWatchSupportCore
2022-04-26 18:57:12.964 xcodebuild[9606:80050] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension
Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/4v/gxt19vmx267662mjsmfhf8mc0000gn/T/flutter_tools.WkwIsq/flutter_ios_build_temp_dirgZNqVy/temporary_xcresult_bundle
Failed to package /Users/adamjackson/Documents/Github/projectQR/Flutter.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
Result bundle written to path:
/var/folders/4v/gxt19vmx267662mjsmfhf8mc0000gn/T/flutter_tools.WkwIsq/flutter_ios_build_temp_dirgZNqVy/temporary_xcresult_bundle
Encountered error while building for device.
Thanks for taking a look!
Solution 1:[1]
I finally found a solution!
The problem ended up being that CocoaPod wasn't installed correctly.
After digging for what felt like a lifetime! I installing HomeBrew again, then reinstalled cocoapod using brew install cocoapods
command. After that I ran flutter clean
and followed that with flutter run
and it signed the app and launched it on my iPhone!
Thanks for ideas and helping me figure this out!
Solution 2:[2]
1. execute
Flutter Clean
then
- Remove the simulator from Xcode and re-add a new simulator
then
- Re-run your app in flutter and it would be
further solution :
- Open iOS module in Xcode.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | just.an.atom |
Solution 2 | Mostafa Mahmoud |