Flutter iOS build fails after upgrading to Xcode 10.0 version in mac.
Nagendras-MacBook-Pro:uaenumber nagendra$ flutter run Launching lib/main.dart on iPhone X in debug mode... Starting Xcode build... Xcode build done. 1.4s Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED ** Xcode's output: ↳ error: Multiple commands produce '/Users/dev/Documents/projects/Personal/uaenumber/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework': 1) Target 'Runner' has copy command from '/Users/dev/Documents/projects/Personal/uaenumber/ios/Flutter/Flutter.framework' to '/Users/dev/Documents/projects/Personal/uaenumber/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' 2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks” warning: The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objcinference” logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target. (in target 'Runner') warning: ignoring duplicated output file: '/Users/nagendra/Documents/projects/Personal/uaedialer/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' (in target 'Runner') note: Using new build systemnote: Planning buildnote: Constructing build description Could not build the application for the simulator. Error launching application on iPhone X.
Xcode Version – 10.0 (10A255)
I tried to recreate the project and copied all the source files to the new project folder but it does not resolve the issue.
This solution worked for me.
- Open ios/Runner.xcworkspace Select the Runner project in the project
- In the main view, select the Runner target, then select the Build Phases tab.
- Expand the Embed Frameworks phase and select Flutter.framework from the
embedded frameworks list.
- Click – to remove Flutter.framework from the list (be sure to keep
Answered By – Nagendra Badiganti
Answer Checked By – Candace Johnson (FlutterFixes Volunteer)