this is my first time using StackOverflow for an actual question so thanks in advance.
I started building Apps (first only for Andoid) using Flutter and i absolutly love it.
After finishing my App and deploying it into the Google Play Store i bought myself a Macbook and i am trying to use that Flutter Code and release it also for App Store.
My Program is using Firebase and i am pretty sure the error is responsible for it, but unfortunatly i am not able to find or fix it.
What have i done already?
I did the full Firebase Setup for IOS, which means downloading the google Services File and placing it unter the first Runner section in xcode.
I also did set the rest that firebase told me up.
(pod install etc.)
The App is running completly fine on Android Emulator but it is not launching on IOS Emulator.
I am using VSCode.
In Code itself i dont have any Errors.
Also i have changed the minimum version in the Pods (first line) to 10.12. Otherwise i couldnt have loaded thes necessary pods.
Error Code on building:
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
lib/main.dart
Xcode build done. 346,1s
Failed to build iOS app
Error output from Xcode build:
↳
* BUILD FAILED *
Xcode's output:
↳
While building module 'firebase_core' imported from /usr/local/Caskroom/flutter/1.22.6/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.16.0/ios/Classes/FLTTransactionStreamHandler.m:6:
In file included from <module-includes>:1:
In file included from /Users/fabianschimpfhauser/Desktop/WhoWouldrather/whowouldrather/ios/Pods/Target Support Files/firebase_core/firebase_core-umbrella.h:13:
In file included from //usr/local/Caskroom/flutter/1.22.6/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.7.0/ios/Classes/FLTFirebaseCorePlugin.h:11:
//usr/local/Caskroom/flutter/1.22.6/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.7.0/ios/Classes/FLTFirebasePlugin.h:9:9: error: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin': '/Users/fabianschimpfhauser/Desktop/WhoWouldrather/whowouldrather/ios/Pods/Headers/Public/FirebaseCore/FirebaseCore.h' [-Werror,-Wnon-modular-include-in-framework-module]
#import <FirebaseCore/FirebaseCore.h>
^
1 error generated.
/usr/local/Caskroom/flutter/1.22.6/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.16.0/ios/Classes/FLTTransactionStreamHandler.m:6:9: fatal error: could not build module 'firebase_core'
#import <firebase_core/FLTFirebasePluginRegistry.h>
~~~^
2 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
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 14.4.99. (in target 'leveldb-library' from project 'Pods')
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 14.4.99. (in target 'shared_preferences' from project 'Pods')
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 14.4.99. (in target 'in_app_purchase' from project 'Pods')
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 14.4.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
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 14.4.99. (in target 'abseil' from project 'Pods')
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 14.4.99. (in target 'BoringSSL-GRPC' from project 'Pods')
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 14.4.99. (in target 'gRPC-Core' from project 'Pods')
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 14.4.99. (in target 'gRPC-C++' from project 'Pods')
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')
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 14.4.99. (in target 'Flutter' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)
Edit: Added Screenshot
Screenshot from Flutter Doctor
Edit2:
Screenshot from X-Code Builder ErrorLog
So, my assumption is:
1 Error: We can see some errors with the Firebase package, but it shouldn't influence on Emulator
2 Error: this one looks like the main reason for your pain
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')
It means you have to open your project in the Code and try this solution:
Go to Xcode preferences -> accounts and sign in to your Apple account and go to your Xcode project and signing & capabilities and choose your account.
Related
I was trying to generate the ipa file to upload it on App Store but unfortunately it failed and says "Encountered error while archiving for device".
I also tried Archiving from Xcode but, the Archive failed there too. It is working great in ios simulator (13)
Failed to build iOS app
Error output from Xcode build:
↳
** ARCHIVE FAILED **
Xcode's output:
Writing result bundle at path:
/var/folders/8s/2st2j0d97k7cm80h3968jnx80000gn/T/flutter_tools.ph1v
kd/flutter_ios_build_temp_dirZbRdRw/temporary_xcresult_bundle
error: the following command failed with exit code 0 but produced no
further output
CompileC
Failed to package /Users/sunsoft/Downloads/alifpet-app-master.
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/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'Sodium' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'ReachabilitySwift' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'Starscream' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 6.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'Reachability' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 7.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'AppAuth' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'PusherSwiftWithEncryption' from project
'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'GoogleSignIn' from project 'Pods')
/Users/sunsoft/Downloads/alifpet-app-master/ios/Pods/Pods.xcodeproj:
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is
set to 8.0, but the range of supported deployment target versions is
9.0 to 15.2.99. (in target 'AgoraRtcEngine_iOS' from project 'Pods')
Result bundle written to path:
/var/folders/8s/2st2j0d97k7cm80h3968jnx80000gn/T/flutter_tools.ph1v
kd/flutter_ios_build_temp_dirZbRdRw/temporary_xcresult_bundle
Encountered error while archiving for device.
The problem here is that the Podfile that Flutter template creates by default has no specific iOS version set unfortunately.
Do this to fix this problem:
in ios/ folder of your project, open the Podfile.
At top of Podfile, make sure this line is not commented out and change the iOS version to 12.0.
change from:
#platform :ios, '8.0'
to:
platform :ios, '12.0'
Run pod deintegrate in Terminal inside the ios/ folder of your project.
Run pod install --repo-update in your ios/ folder
This should do the trick!
If after this you are getting the following error
CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target
Then you need to open your iOS workspace in Xcode and select your root project on top left, then inside the Info tab, choose your configuration (in this case Debug) and change it to None. After that, do pod install again.
I am getting this error while building with command flutter build ipa --release --no-tree-shake-icons while it is working fine when i archive with xcode.
Result bundle written to path:
/var/folders/ds/bbptl8p5391_lg2drzvrgt3w0000gn/T/flutter_tools.VLOTC5/flutter_ios_build_temp_d
ir8SL9Nl/temporary_xcresult_bundle
Uncategorized (Xcode): Exited with status code 1
Encountered error while archiving for device.
As the title suggests, I simply cannot run my flutter app on Android Studio (using the IOS simulator). Somehow, if I run and fix all Xcode errors in Xcode itself, I am able to run it.
However, when I try to run it in android studio a second later, many errors appear coming from the IOS build. There is no specific error log as the warning are always different.
Here are some of the causes that I am suspicious of:
I updated to Xcode 13, which has a new build system.
I updated to a new Flutter version.
I updated to a new Android Studio Version (Arctic Fox).
I have tried many things, including:
Pod deintegrate** & pod install
Cleaning and running
Restarting the computer
Legacy build system
All of the answers in this Stack Overflow post
There are just too many things I have tried, I only remember half of them. Here is my latest error log when trying to build from Android Studio:
EDIT--------
Here is my most recent error log:
Xcode's output:
↳
ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/tomasward/Desktop/Fredi/ios/Pods/TwitterKit/iOS/TwitterKit.framework/TwitterKit' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
/Users/tomasward/Desktop/Fredi/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.0.99. (in target 'TOCropViewController-TOCropViewControllerBundle' from project 'Pods')
/Users/tomasward/Desktop/Fredi/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.0.99. (in target 'FMDB' from project 'Pods')
/Users/tomasward/Desktop/Fredi/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.0.99. (in target 'TOCropViewController' from project 'Pods')
/Users/tomasward/Desktop/Fredi/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.0.99. (in target 'Reachability' from project 'Pods')
/Users/tomasward/Desktop/Fredi/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.0.99. (in target 'AppAuth' from project 'Pods')
/Users/tomasward/Desktop/Fredi/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.0.99. (in target 'leveldb-library' from project 'Pods')
/Users/tomasward/Desktop/Fredi/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.0.99. (in target 'GoogleSignIn' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro.
Solved after a month
The only truly important error was the following:
ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/tomasward/Desktop/Fredi/ios/Pods/TwitterKit/iOS/TwitterKit.framework/TwitterKit' for architecture arm64
What is it actually saying?
arm64 is an architecture used for physical devices, not for the simulator. So, I was trying to simulate an invalid architecture in a virtual device.
I had read that I needed to exclude arm64 from my build settings in my target project. However, the missing step was to also exclude it from pods as follows:
Voilá!
Why am I unable to launch my app from android studio where I can successfully run the app from xcode? I am facing this issue after integrating OneSignal to my project.
Launching lib/main_development.dart on iPhone 8 Plus in debug mode...
Running Xcode build...
Xcode build done. 24.5s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
ld: in /Users/.../customer_app_flutter/ios/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/OneSignal(OneSignal-arm64-master.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/.../customer_app_flutter/ios/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework/OneSignal'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Command CompileSwift failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
/Users/.../customer_app_flutter/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 14.5.99. (in target 'Mantle' from project 'Pods')
/Users/.../customer_app_flutter/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 14.5.99. (in target 'libwebp' from project 'Pods')
/Users/.../customer_app_flutter/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 14.5.99. (in target 'Toast' from project 'Pods')
/Users/.../customer_app_flutter/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 14.5.99. (in target 'Reachability' from project 'Pods')
/Users/.../customer_app_flutter/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 14.5.99. (in target 'OrderedSet' from project 'Pods')
/Users/.../customer_app_flutter/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 14.5.99. (in target 'FMDB' from project 'Pods')
/Users/.../customer_app_flutter/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 14.5.99. (in target 'FBSDKCoreKit' from project 'Pods')
/Users/.../customer_app_flutter/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 14.5.99. (in target 'OneSignalXCFramework' from project 'Pods')
/Users/.../customer_app_flutter/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 14.5.99. (in target 'OneSignal' from project 'Pods')
/Users/.../customer_app_flutter/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 14.5.99. (in target 'Flutter' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 8 Plus.
open the iOS project in Xcode and change Validate Workspace setting in Build Settings to YES
While adding OneSignal Notification Service Extension one must select Cancel. And this is why i was facing these issues as I had selected Activate option. Follow this documentation to integrate OneSignal successfully
I have the problem that I can no longer simulate my apps via Xcode, neither on the simulator (any device), nor on the real device.
I constantly get the error code:
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
...with different warnings underneath.
The following happened: All projects worked fine. Then I downloaded the package "nfc_manager 3.0.0+1" in addition to my already integrated package "nfc_in_flutter". Since this did not work, I deleted the nfc_manager package again. A short time later, this error occurred. I don't know if it has anything to do with this, but maybe it helps.
Now I can't simulate any of my projects via Xcode.
I have tried every conceivable solution I found on Stack Overflow about this issue - without any success.
In addition, I have logged in and logged out of keychain, restarted the mac, and completely uninstalled and re-downloaded Xcode.
Please help.
nico#Nicos-MBP ios % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 2.2.0-11.0.pre.215, on Mac OS X 10.15.7 19H524 darwin-x64, locale de-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.55.2)
[✓] Connected device (2 available)
• No issues found!
nico#Nicos-MBP ios % xcdoe clean
zsh: command not found: xcdoe
nico#Nicos-MBP ios % clean xcode
zsh: command not found: clean
nico#Nicos-MBP ios % flutter clean
Changing current working directory to: /Users/nico/AndroidStudioProjects/corona_impf_it
Cleaning Xcode workspace... 3,4s
Deleting build... 379ms
Deleting .dart_tool... 66ms
Deleting .packages... 0ms
Deleting Generated.xcconfig... 0ms
Deleting flutter_export_environment.sh... 0ms
Deleting Flutter.podspec... 0ms
Deleting .flutter-plugins-dependencies... 1ms
Deleting .flutter-plugins... 0ms
nico#Nicos-MBP ios % flutter run
Changing current working directory to: /Users/nico/AndroidStudioProjects/corona_impf_it
Running "flutter pub get" in corona_impf_it... 936ms
Launching lib/main.dart on iPhone 12 Pro in debug mode...
Running pod install... 10,8s
Running Xcode build...
Xcode build done. 224,7s
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: 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 14.4.99. (in target 'gRPC-C++-gRPCCertificates-Cpp' from project 'Pods')
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 14.4.99. (in target 'GoogleDataTransport' from project 'Pods')
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 14.4.99. (in target 'gRPC-Core' from project 'Pods')
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 14.4.99. (in target 'leveldb-library' from project 'Pods')
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 14.4.99. (in target 'nanopb' from project 'Pods')
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 14.4.99. (in target 'gRPC-C++' from project 'Pods')
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 14.4.99. (in target 'abseil' from project 'Pods')
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 14.4.99. (in target 'GoogleUtilities' from project 'Pods')
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 14.4.99. (in target 'FirebaseCore' from project 'Pods')
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 14.4.99. (in target 'FirebaseFirestore' from project 'Pods')
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 14.4.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
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 14.4.99. (in target 'FirebaseAuth' from project 'Pods')
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 14.4.99. (in target 'BoringSSL-GRPC' from project 'Pods')
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 14.4.99. (in target 'Flutter' from project 'Pods')
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 14.4.99. (in target 'Firebase' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro.
I had the same issue in Flutter 2.2.0 and updated to hotfix 2.2.1 which resolves the issue.
https://github.com/flutter/flutter/wiki/Hotfixes-to-the-Stable-Channel
I'm trying to build an iOS flutter app in windows using Codemagic. I created the flutter project in android studio and uploaded it to github in order to use it in Codemagic... But when I try to build the iOS app, Codemagic throws me this error:
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.jmmago.saltApp for device (ios-release)...
Running pod install... 16.0s
Running Xcode build...
Xcode build done. 124.3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/builder/programs/flutter/.pub-cache/hosted/pub.dartlang.org/barcode_scan-3.0.1/ios/Classes/protos/protos.pb.swift:14:8: error: compiling for iOS 8.0, but module 'SwiftProtobuf' has a minimum deployment target of iOS 9.0: /Users/builder/clone/build/ios/Release-iphoneos/SwiftProtobuf/SwiftProtobuf.framework/Modules/SwiftProtobuf.swiftmodule/armv7-apple-ios.swiftmodule
import SwiftProtobuf
^
Command CompileSwift failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'barcode_scan' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'sqflite' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'shared_preferences' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'path_provider' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'image_picker' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'MTBBarcodeScanner' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'FMDB' from project 'Pods')
warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.1.99. (in target 'Flutter' from project 'Pods')
════════════════════════════════════════════════════════════════════════════════
Building a deployable iOS app requires a selected Development Team with a
Provisioning Profile. Please ensure that a Development Team is selected by:
1- Open the Flutter project's Xcode target with
open ios/Runner.xcworkspace
2- Select the 'Runner' project in the navigator then the 'Runner' target
in the project settings
3- Make sure a 'Development Team' is selected.
- For Xcode 10, look under General > Signing > Team.
- For Xcode 11 and newer, look under Signing & Capabilities > Team.
You may need to:
- Log in with your Apple ID in Xcode first
- Ensure you have a valid unique Bundle ID
- Register your device with your Apple Developer Account
- Let Xcode automatically provision a profile for your app
4- Build or run your project again
For more information, please visit:
https://flutter.dev/setup/#deploy-to-ios-devices
Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
Encountered error while building for device.
Build failed :|
Failed to build for iOS
In this question, they solved this same problem creating a podfile. But how I create a Podfile?
I have to create it in my project and then push it to github? Or there is a way to create it in Codemagic?
I think it might be enough to open up your project up in VSCODE and change the 'IPHONEOS_DEPLOYMENT_TARGET' to 9.0 in all 3 places where it is present. In addition check your AppFrameworkInfo.plist file and set the MinimumiOSVersion to 9.0 there as well.
If you wish to create a podfile through Codemagic however, then you might try to put this into your pre build script for the first run (and remove it later):
cd ios && pod init && git add . && git commit -m "Add Podfile to project" && git push
I, particularly, choose beta as flutter channel and worked well, did not try the app on a real device yet though.