I am facing many issues since I migrated my project to an Apple Silicon mac. I finally managed to reduce the problems but not sure the answer to this.
Running "flutter pub get" in Flutter_the app copy 3... 760ms
Launching lib/main.dart on iPhone 11 in debug mode...
Running pod install... 986ms
Running Xcode build...
Xcode build done. 1.5s
Failed to build iOS app
Error output from Xcode build:
↳
objc[95181]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x20ba238f0) and ??
(0x1160dc2b8). One of the two will be used. Which one is undefined.
objc[95181]: Class AMSupportURLSession is implemented in both ?? (0x20ba23940) and ?? (0x1160dc308). One
of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
error: /Users/gorkem/Documents/flutter_workspace/Flutter_the app copy 3/ios/Flutter/Debug.xcconfig:
unable to open file (in target "Runner" in project "Runner") (in target 'Runner' from project 'Runner')
error: /Users/gorkem/Documents/flutter_workspace/Flutter_the app copy 3/ios/Flutter/Debug.xcconfig:
unable to open file (in target "Runner" in project "Runner") (in target 'Runner' from project 'Runner')
error: /Users/gorkem/Documents/flutter_workspace/Flutter_the app copy 3/ios/Flutter/Debug.xcconfig:
unable to open file (in target "Runner" in project "Runner") (in target 'Runner' from project 'Runner')
warning: Unable to read contents of XCFileList '/Target Support
Files/Pods-Runner/Pods-Runner-frameworks-Debug-output-files.xcfilelist' (in target 'Runner' from project
'Runner')
error: Unable to load contents of file list: '/Target Support
Files/Pods-Runner/Pods-Runner-frameworks-Debug-input-files.xcfilelist' (in target 'Runner' from project
'Runner')
error: Unable to load contents of file list: '/Target Support
Files/Pods-Runner/Pods-Runner-frameworks-Debug-output-files.xcfilelist' (in target 'Runner' from project
'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11.
Is there any way to solve this. I am not sure if the problem is even written in there.
4
Answers
I was getting the same "error output from Xcode build" with my M1 macbook recently as well after updating to Flutter 2.x.
I was able to clear this issue on mine by doing the following:
your_project/build/ios/Debug-iphonesimulator/
Apparently flutter projects have extended attributes in project app bundles containing Finder info which causes an error.
I found these links that helped for reference.
https://developer.apple.com/library/archive/qa/qa1940/_index.html
https://github.com/flutter/flutter/issues/72492
Try Selecting For install builds only in the run script in the Build phases tab.
I was getting this error
Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib
NOTE:
Try this first if you have updated to flutter 2.10 from <=2.8
Solution:
Please open podfile and update with this script
or instead of last command you can try below for M1
Run your app.
Two things need to change:
First check the Dependancy for APNs if need to upgrade. Then Change the version in the POD file and then add
pod ‘GoogleUtilities’
To the POD target like following:
target ‘Runner’ do
use_frameworks!
use_modular_headers!
flutter_install_all_macos_pods File.dirname(File.realpath(FILE))
pod ‘GoogleUtilities’
end
.
After this Run Flutter pug get and Flutter run. It works for me.
Ref screenshot for POD file