Flutter Xcode build failed error unable to spawn process - ios

I followed the Flutter docs to the letter doing the install etc. Downloaded the Zip and extracted to my own dev directory. I added the flutter path.
export PATH="/Users/me/dev/flutter/bin:$PATH"
Tested flutter doctor
$ flutter doctor -v
[✓] Flutter (Channel stable, 1.22.6, on macOS 11.2.1 20D75 darwin-x64, locale
en-US)
• Flutter version 1.22.6 at /Users/me/dev/flutter
• Framework revision 9b2d32b605 (5 weeks ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/me/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin installed
• Dart plugin version 201.9317
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
[✓] IntelliJ IDEA Community Edition (version 2020.3.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin installed
• Dart plugin version 203.6912
[✓] Connected device (1 available)
• iPhone 11 Pro (mobile) • 95B08A93-656C-42F9-AD8B-AF2325CFCAF2 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• No issues found!
/Users/me/dev/flutter/bin/flutter
/Users/me/dev/flutter/bin/dart
then did the Xcode set up according to the docs.
And finally created the flutter project from the command line, and flutter run.
Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running Xcode build...
└─Compiling, linking and signing... 4.2s
Xcode build done. 48.4s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: unable to spawn process
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
/usr/bin' (Permission denied) (in target 'Runner' from project 'Runner')
warning: Could not read serialized diagnostics file: error("Failed to open
diagnostics file") (in target 'Runner' from project 'Runner')
error: unable to spawn process
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
/usr/bin' (Permission denied) (in target 'Runner' from project 'Runner')
warning: Could not read serialized diagnostics file: error("Failed to open
diagnostics file") (in target 'Runner' from project 'Runner')
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro.
Any Ideas to the issue ?

Try to open ios folder by using Xcode and run it !

Related

flutter unable to run project in ios simulator

Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Writing result bundle at path:
/var/folders/s5/4_qqjtfs4xb49hsqkc0zxbp80000gn/T/flutter_tools.WfBuSW/flutt
er_ios_build_temp_dirLqqAmi/temporary_xcresult_bundle
Failed to package /Users/striky/Desktop/PROJECTS/todolist.
Command PhaseScriptExecution failed with a nonzero exit code
note: Building targets in dependency order
note: Removed stale file
'/Users/striky/Library/Developer/Xcode/DerivedData/Runner-hdulzpfkpeuryafona
wcbytfruum/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Ru
nner.build/DerivedSources/Pods-Runner-checkManifestLockResult.txt'
note: Removed stale file
'/Users/striky/Library/Developer/Xcode/DerivedData/Runner-hdulzpfkpeuryafona
wcbytfruum/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Ru
nner.build/Script-1539170295D304EE9D220D88.sh'
warning: Run script build phase 'Run Script' will be run during every build
because it does not specify any outputs. To address this warning, either add
output dependencies to the script phase, or configure it to run in every
build by unchecking "Based on dependency analysis" in the script phase. (in
target 'Runner' from project 'Runner')
warning: Run script build phase 'Thin Binary' will be run during every build
because it does not specify any outputs. To address this warning, either add
output dependencies to the script phase, or configure it to run in every
build by unchecking "Based on dependency analysis" in the script phase. (in
target 'Runner' from project 'Runner')
Result bundle written to path:
/var/folders/s5/4_qqjtfs4xb49hsqkc0zxbp80000gn/T/flutter_tools.WfBuSW/flutt
er_ios_build_temp_dirLqqAmi/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
my flutter doctor -v
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-arm (Rosetta),
locale en-MY)
• Flutter version 3.3.10 on channel stable at /Users/striky/flutter 2
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 135454af32 (4 weeks ago), 2022-12-15 07:36:55 -0800
• Engine revision 3316dd8728
• Dart version 2.18.6
• DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/striky/Library/Android/sdk
• Platform android-33, build-tools 33.0.1
• Java binary at: /Applications/Android
Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
11.0.13+0-b1751.21-8125866)
[✓] VS Code (version 1.74.2)
• VS Code at /Users/striky/Desktop/Visual Studio Code.app/Contents
• Flutter extension version 3.56.0
[✓] Connected device (3 available)
• iPhone 14 Pro Max (mobile) • 39508EF8-CD30-49F2-8FF2-F124A0F25CE5 • ios
• com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
• macOS (desktop) • macos •
darwin-arm64 • macOS 13.1 22C65 darwin-arm (Rosetta)
• Chrome (web) • chrome •
web-javascript • Google Chrome 108.0.5359.124
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!

Command PhaseScriptExecution failed with a nonzero exit code when flutter run in debug

I have a Flutter project which runs perfectly in v2.3.3. I upgraded the flutter version to 3.0.0 in order to use null safety feature. I solved every errors. However when I ran the project, I got Command PhaseScriptExecution failed with a nonzero exit code error. I couldn't find any reasonable and logical solutions throughout internet. Could you please help me on this issue?
Launching lib/main.dart on iPhone SE (3rd generation) in debug mode...
Running pod install... 5.7s
Running Xcode build...
Xcode build done. 18.1s
Failed to build iOS app
Error output from Xcode build:
↳
2022-05-16 15:32:57.974 xcodebuild[72650:368105] 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-05-16 15:32:57.974 xcodebuild[72650:368105] 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/00/r0s0tm0x1s33__6xjw2fml1r0000gn/T/flutter_tools.EYRty2/flutter_ios_build_temp_dir7bCY7C/temporary_xcresult_bundle
ld: warning: linking against a dylib which is not safe for use in application extensions:
/Users/****/Projects/ES.Online.Mobile/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/InsiderMobileAdvancedNotification/InsiderMobileAdvancedNotification.framework/Ins
iderMobileAdvancedNotification
ld: warning: linking against a dylib which is not safe for use in application extensions:
/Users/****/Projects/ES.Online.Mobile/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/InsiderMobileAdvancedNotification/InsiderMobileAdvancedNotification.framework/Ins
iderMobileAdvancedNotification
ld: warning: linking against a dylib which is not safe for use in application extensions:
/Users/****/Projects/ES.Online.Mobile/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/InsiderMobileAdvancedNotification/InsiderMobileAdvancedNotification.framework/Ins
iderMobileAdvancedNotification
ld: warning: linking against a dylib which is not safe for use in application extensions:
/Users/****/Projects/ES.Online.Mobile/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/InsiderMobileAdvancedNotification/InsiderMobileAdvancedNotification.framework/Ins
iderMobileAdvancedNotification
Failed to package /Users/****/Projects/ES.Online.Mobile.
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
/Users/****/Projects/ES.Online.Mobile/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of
supported deployment target versions is 9.0 to 15.4.99. (in target 'ReachabilitySwift' from project 'Pods')
/Users/****/Projects/ES.Online.Mobile/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of
supported deployment target versions is 9.0 to 15.4.99. (in target 'FMDB' from project 'Pods')
Result bundle written to path:
/var/folders/00/r0s0tm0x1s33__6xjw2fml1r0000gn/T/flutter_tools.EYRty2/flutter_ios_build_temp_dir7bCY7C/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).
flutter doctor -v output:
[✓] Flutter (Channel stable, 3.0.0, on macOS 12.3.1 21E258 darwin-x64, locale en-TR)
• Flutter version 3.0.0 at /Users/****/Developer/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ee4e09cce0 (7 days ago), 2022-05-09 16:45:18 -0700
• Engine revision d1b9a6938a
• Dart version 2.17.0
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/****/Library/Android/sdk
• Platform android-30, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.67.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.40.0
[✓] Connected device (3 available)
• iPhone SE (3rd generation) (mobile) • 33A8F736-A4EA-41E7-8567-408A051F9952 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator)
• macOS (desktop) • macos • darwin-x64 • macOS 12.3.1 21E258 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 101.0.4951.64
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
I faced the same issue and resolved it by upgrading a package. Within the spam of warning logs, there was one line that mentioned "Error" instead of "Warning", due to parameter change e.g. in my case for a TextField. I saw the package had an updated version for Flutter 3.0 and reran after upgrading. The warning logs will be still there, but you're app should be running afterwards.
Check for Errors within the Warning Logs thrown by Packages from your pubspec.yaml
I have same issue and I solved in this way:
Update MacOS
Update Xcode and command lines tools
Run flutter pub upgrade, flutter pub get in the project folder
Delete podfile.lock in ios folder of the project
Run cd ios, pod repo update, pod install in the project folder

Could not build the application for the simulator

I tried to run the flutter app on the IOS platform, it is showing an error and the error is not able to fix it.
It was working fine and I tried to add the firebase, from then I am getting this error.
output:
elamparithibalakrishnan#Elamparithis-MacBook-Pro ios % flutter run
Changing current working directory to: /Users/elamparithibalakrishnan/AndroidStudioProjects/quizi_mobile_app
Multiple devices found:
AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
iPhone 12 Pro Max (mobile) • 1E0E6387-F349-4ECA-9858-385698232158 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.82
[1]: AOSP on IA Emulator (emulator-5554)
[2]: iPhone 12 Pro Max (1E0E6387-F349-4ECA-9858-385698232158)
[3]: Chrome (chrome)
Please choose one (To quit, press "q/Q"): 2
Running "flutter pub get" in quizi_mobile_app... 1,214ms
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install... 7.4s
Running Xcode build...
Xcode build done. 71.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a
development team in the Runner editor. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Flutter doctor:
elamparithibalakrishnan#Elamparithis-MacBook-Pro ios % flutter doctor -v
[✓] Flutter (Channel master, 2.1.0-11.0.pre.229, on macOS 11.2 20D64 darwin-x64, locale en-GB)
• Flutter version 2.1.0-11.0.pre.229 at /Users/elamparithibalakrishnan/Desktop/flutter
• Framework revision d20ec4c7d8 (5 hours ago), 2021-03-11 22:18:51 -0800
• Engine revision 1b68503bc8
• Dart version 2.13.0 (build 2.13.0-125.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/elamparithibalakrishnan/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] Connected device (3 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• iPhone 12 Pro Max (mobile) • 1E0E6387-F349-4ECA-9858-385698232158 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.82
• No issues found!
I couldn't able to find the exact issue.
Can anyone please help me with this issue?
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a
development team in the Runner editor. (in target 'Runner' from project 'Runner')
You have to select a development team id in your xcode worspace file an rerun it after that.

Flutter: firebase_admob build fails in Xcode

I have problem with archiving my project in Xcode, it fails and throws an error: Module 'firebase_admob' not found
Build project: $flutter build ios
Select Product > Archive
Also I had to rollback Google-Mobile-Ads-SDK version from the newest 8.0.0 to 7.69.0 to make $flutter build ios work as described here
I've already cleaned and updated pods:
$flutter clean
$rm ios/podfile.lock
$rm ios/podfile
$pod update
$flutter pub get
I set target version to 12.0 in Podfile and Xcode settings.
For now I can build my project with $flutter build ios command but I can't archive it in Xcode for further distribution.
Flutter doctor
[✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H2 darwin-x64, locale ru-RU)
• Flutter version 1.22.6 at /Users/bob/Documents/Projects/Flutter/flutter
• Framework revision 9b2d32b605 (3 weeks ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/bob/Library/Android/sdk
• Platform android-29, build-tools 29.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.3, Build version 12C33
• CocoaPods version 1.10.1
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin installed
• Dart plugin version 201.9245
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] VS Code (version 1.53.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.19.0
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
Dart SDK 2.10.5
Flutter SDK 1.22.6
app 1.0.0+1
dependencies:
- cupertino_icons 1.0.0
- firebase_admob 0.11.0+1 [meta flutter firebase_core]
- firebase_core 0.7.0 [firebase_core_platform_interface flutter quiver meta firebase_core_web]
One way to get around this is to build ipa file. You have to change Flutter's channel to the beta or master and upgrade to the latest version:
$flutter channel beta
$flutter upgrade
Then you should use the new feature of build tool:
$flutter build ipa
It generates archive in your project folder: <app_name>/build/ios/archive/<provisioning_profile_name>.xcarchive
So, you can open generated archive (i.e. My Test App.xcarchive) with Xcode and then validate it and upload to AppStore Connect as usual.

iOS Multiple Environment Issue After Upgrade to Flutter 1.17.1

I have been getting this error since I upgraded to Flutter 1.17.1 few days ago...I tried cleaning the project and switch back to the Legacy build system in Xcode but still getting the same issue.
My project has been using this method to handle multiple environments and it was working perfectly until I upgraded few days ago.
https://medium.com/#animeshjain/build-flavors-in-flutter-android-and-ios-with-different-firebase-projects-per-flavor-27c5c5dac10b
Help is definitely appreciated!
Xcode's output:
↳
error: Multiple commands produce '/Users/ivanchau/AndroidStudioProjects/fella/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist':
1) Target 'Runner' (project 'Runner') has copy command from '/Users/ivanchau/AndroidStudioProjects/fella/ios/Runner/Firebase/development/GoogleService-Info.plist' to '/Users/ivanchau/AndroidStudioProjects/fella/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist'
2) Target 'Runner' (project 'Runner') has copy command from '/Users/ivanchau/AndroidStudioProjects/fella/ios/Runner/Firebase/production/GoogleService-Info.plist' to '/Users/ivanchau/AndroidStudioProjects/fella/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist'
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: duplicate output file '/Users/ivanchau/AndroidStudioProjects/fella/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist' on task: CopyPlistFile /Users/ivanchau/AndroidStudioProjects/fella/build/ios/Debug-development-iphonesimulator/Runner.app/GoogleService-Info.plist /Users/ivanchau/AndroidStudioProjects/fella/ios/Runner/Firebase/production/GoogleService-Info.plist (in target 'Runner' from project 'Runner')
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')
warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')
[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.4 19E287, locale en-CA)
• Flutter version 1.17.1 at /Users/ivanchau/Documents/flutter
• Framework revision f7a6a7906b (4 days ago), 2020-05-12 18:39:00 -0700
• Engine revision 6bc433c6b6
• Dart version 2.8.2
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/ivanchau/Library/Android/sdk
• Platform android-29, build-tools 28.0.3
• ANDROID_HOME = /Users/ivanchau/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4.1, Build version 11E503a
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.8052
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] Connected device (1 available)
• iPhone 11 Pro • 357DAB56-8A57-4AB3-A319-0FC1EBCA1515 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)
• No issues found!
In build phases (after openning your project/ Runner.xcworkspace. in Xcode) check the build phase called 'Copy bundle Resources' and remove the 2*n lines copying your GoogleService-info.plist per environment.
This supposes that you have a custom script that, depending of the flavour/ Scheme will copy the right file.
I am using the similar method for different flavor. I can build for Android but cannot build for iOS anymore after upgrade to Flutter 1.17.1 and xcode 11.5
It says in your error that you have duplicates. Did you use the following command?
flutter run --flavor yourflavor

Resources