IPHONEOS_DEPLOYMENT_TARGET is set to 8.0 Xcode 12 (Flutter)
Solution 1
In addition to what Akif said, here's a running list of reasons why this error could be showing up for you:
- Set the
MinimumOSversion
to9.0
inios/Flutter/AppFrameworkInfo.plist
- In Xcode, ensure that the iOS deployment target at
Runner -> Project -> Runner
is set to9.0
- In Xcode, ensure that the
Deployment Info
inRunner -> Targets -> Runner
is set to iOS9.0
- Double check that your
GoogleService-Info.plist
is there and was added via Xcode (not copy/pasted into the directory via Finder for example) - Uncomment the
#platform :iOS, '9.0'
line in yourios/Podfile
Then, run the following in your terminal to build with a fresh state:
flutter clean \
&& rm ios/Podfile.lock pubspec.lock \
&& rm -rf ios/Pods ios/Runner.xcworkspace \
&& flutter build ios
Solution 2
replace this code of pod file:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
Solution 3
You need to set MinimumOSVersion
to 9.0
in ios/Flutter/AppFrameworkInfo.plist
. It will look like this:
<key>MinimumOSVersion</key>
<string>9.0</string>
Solution 4
Error is self-explanatory that deployment target is missed for application.
This will be added in two places inside Xcode, check the below screenshot where iOS Deployment Target is mention.
1. Runner
2.Pod
Solution 5
If after trying all the solutions above, your code is still not working, especially after an update/upgrade...
Just check out your dart version and also check out for null safety packages...
I just solved mine after battling with errors for days by properly migrating my codes to null safety.
Finley Adams
Updated on July 09, 2022Comments
-
Finley Adams almost 2 years
I run my Flutter project in Android Studio, pod installation goes well but Xcode build fails at the end every time like 20/30 steps first of complete the whole build. The weird fact is that Android Studio says :
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.2.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.2.99. (in target 'path_provider' 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.2.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.2.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.2.99. (in target 'AppAuth' 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.2.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.2.99. (in target 'GTMAppAuth' 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.2.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.2.99. (in target 'google_sign_in' 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.2.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.2.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.2.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.2.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.2.99. (in target 'firebase_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.2.99. (in target 'firebase_auth' 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.2.99. (in target 'cloud_firestore' 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.2.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.2.99. (in target 'Firebase' 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.2.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.2.99. (in target 'GoogleSignIn' 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.2.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.2.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.2.99. (in target 'abseil' from project 'Pods')
But when I open the workspace with Xcode I see that my target in Runner has
iOS deployment target 14.0
so I don't understand, it should be set to 14 but actually it's 8. Flutter generatedPodfile
,Podfile.lock
andPods
throughflutter run
I prefer to let Flutter handle Pod generation and installation without usingpod init
,pod install
or editingPodfile
. -
Finley Adams over 3 yearsI don't have this folder. My path is "ios/Flutter/" and inside Flutter I have "App.framework, flutter_export_enviroment.sh, Flutter.framework, Flutter.podspec, Generated.xconfig".But inside Flutter.framework there's a "Info.plist". And here yes there's the voice "MinimumiOSVersion" and I set it to 14, is it correct?
-
Akif over 3 yearsNo, set it to 9.
-
Finley Adams over 3 yearsThere isn't "Deployment info" but "Deployment target" instead, and both are set to 14, is it the same?
-
Finley Adams over 3 yearsOk I trust you but why? Isn't better to set it for newer versions?
-
Akif over 3 yearsNo. You are defining the minimum OS version. And It should be at least 9.0 for iOS. And the newer versions like 10, 11, 12, 13, 14 can use your app. But if you set it to 14, then only iOS14 iPhones will use your app.
-
Finley Adams over 3 yearsOh you're right thanks! Ok I did it but when the run ends that line has been changed back to 8.0 and I have the same error.
-
Finley Adams over 3 yearsI did all these stuffs but when the run ends I have "MinimumiOSVersion" back to 8.0...And the same error again
-
Akif over 3 yearsFollow the steps of @thefoxrocks's answer.
-
Finley Adams over 3 yearsI did it but I have the same error, maybe Xcode version 12 isn't a good choice?
-
Finley Adams over 3 yearsLet us continue this discussion in chat.
-
Akif over 3 yearsI'm in the chat room.
-
Akif over 3 yearsremove # and uncomment that line in the podfile. # platform :ios, '9.0'
-
Finley Adams over 3 yearsDid it but still the same, nothing changed
-
Akif over 3 yearsI'm in the chat room again.
-
Akif over 3 yearsyou can try to add that line in ios/Runner/info.plist: <key>MinimumOSVersion</key> <string>9.0</string>
-
thefoxrocks over 3 years@FinleyAdams Make sure you're setting the right
AppFrameworkInfo.plist
that's inios/Flutter
. I know there's anotherAppFrameworkInfo
that will override at build time which might be the one you're using. -
genericUser over 3 years"flutter build iOS" should be lowercase "flutter build ios"
-
waletoye about 3 years@Akif can you help out. having same exact issues. flutter
-
Akif about 3 yearsDefine the issue in a new question!
-
PAYRE Quentin about 3 yearsInfortunetly I got this :
The Xcode project defines schemes: dev, prod, staging You must specify a --flavor option to select one of the available schemes.
. I pass the entire day figuring out how to solve this issue.. migrate from 2.0.3 to 2.0.5 -
Kishan Dhankecha almost 3 years@FinleyAdams Have you got the solution??
-
Alexa289 over 2 yearswhat do you mean with check out dart version? and how to solve the issue? could you please elaborate more?
-
LearningPath over 2 yearsThis is non quality to have to specify ios platform in various location...there should be a single entry point...I feel ios coding environment is quite a bugging mess with a lovely interface
-
goldensoju almost 2 yearsfor flutter apps,
flutter_additional_ios_build_settings(target)
should be added after lineinstaller.pods_project.targets.each do |target|
.