The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1
Solution 1
You can set up your podfile to automatically match the deployment target of all the podfiles to your current project deployment target like this :
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 2
The problem is in your pod files deployment target iOS Version not in your project deployment target iOS Version, so you need to change the deployment iOS version for your pods as well to anything higher than 8.0 to do so open your project workspace and do this:
1- Click on pods.
2- Select each project and target and click on build settings.
3- Under Deployment section change the iOS Deployment Target version to anything more than 8.0 (better to try the same project version).
4- Repeat this for every other project in your pods then run the app.
Solution 3
Instead of specifying a deployment target in pod post install, you can delete the pod deployment target for each pod, which causes the deployment target to be inherited from the Podfile
.
You may need to run pod install
for the effect to take place.
platform :ios, '12.0'
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
Solution 4
Iterating over the answer from Tao-Nhan Nguyen, accounting the original value set for every pod, adjusting it only if it's not greater than 8.0... Add the following to the Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if Gem::Version.new('8.0') > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
end
end
end
end
Solution 5
If anyone came here from react native issue, just delete the /build folder and type react-native run ios
Related videos on Youtube
Naresh
iOS - iPhone, iPad app developer. Languages: Swift & Objective C. IoT, Home Automation - product & service based apps. MVVM, MVC. Experience on Wi-Fi, BLE, ZIGBEE, Z-WAVE and IR devices addition and control. Brands worked on Tuya, Philips, LIFX and Remotech etc... I prefer teamwork over working alone.
Updated on July 08, 2022Comments
-
Naresh almost 2 years
I'm getting this below warning message in my Xcode 10.1.
The iOS Simulator deployment targets are set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.1.
My simulator os in 12.1 Xcode 10.1
And I updated my pod file.
My deployment target is 9.0
In my target
-
Vinaykrishnan over 5 yearsPlease verify the target in the user-images.githubusercontent.com/5786033/…, Edit : In the framework
-
Naresh over 5 years@ Vinaykrishnan, I checked it's 9.0
-
Vinaykrishnan over 5 yearsThis guys had the same issue check this could help you, github.com/flutter/flutter/issues/22123 and github.com/CocoaPods/CocoaPods/issues/8069 . Open your
Xcode
and there isFile
upper-left next to Apple icon, then openWorkspace Settings
and change the build system to` Legacy Build System`. And if you haven't tried this yet stackoverflow.com/a/52552878/2323806
-
-
Mihai Damian almost 5 yearsThe Pods project is auto generated. You shouldn't mess with it.
-
Ahmed El-Bermawy almost 5 yearsI did not mess with the pod (although i found no problem doing so as it's made by human ..) i just changed the version of the iOS that it should be targeted which is acceptable. and this is a better solution than the accepted one which is forcing you to decrease your own project iOS version.
-
Mihai Damian almost 5 yearsI'm not saying that the accepted solution is better, just that editing generated files is bad practice. Any file generated by Cocoapods shouldn't be edited manually since it may get overwritten in the future. If you don't like the output you can make adjustments from the Podfile via post_install. These files shouldn't even be committed on your repo.
-
gkeenley almost 5 years@MihaiDamian Re "make adjustments from the Podfile via post_install": how would you do that for this scenario?
-
Muhammad over 4 yearsI have the same warning, but the build is success, So is this important and will make problem on relase ?
-
Ahmed El-Bermawy over 4 years@Muhammad It have to be answered from the POD developer himself, anyway for me I would not leave any warnings for my project with release
-
Matt Fletcher over 4 yearsBecause changing the podfiles directly doesn't save anything into git, it won't stick and installing a new pod will undo it. One of my major issues was having AppCenter not build properly because of the version issues. Changing it manually won't make any difference, you have to modify the podfile and commit the code up, as per Tao's answer
-
Erik Escobedo over 4 yearsWhere is this
/build
folder located, colleague? -
shogitai over 4 years
./project-root/ios/build
-
Fattie about 4 yearsthanks for the great answer! Curious - would it be possible to automate the '9.0' on line four ... so that it just takes the deployment target from your main project??
-
George Salamanca about 4 yearsWhat if you already have another post install hook? I'm getting an error indicating multiple post installs is not supported
-
Grigory Entin about 4 yearsThis does not seem to work if the minimum deployment target of a pod is already higher than the one enforced. So we'd need to take the original value into account.
-
baskInEminence almost 4 yearsThis fixed up 100s of xcode warnings for a newly created react native app
-
Ric Santos almost 4 yearsThis is not longer a suitable solution for me, as the New Build System (Default) is required to generate SwiftUI previews :(
-
Simon Hansen almost 4 years@GeorgeSalamanca, you can put into the same post_install block
-
rmp251 almost 4 years@Fattie I believe you can just do
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
-
Rami Alloush almost 4 yearsYou can select all of them and change at once
-
SmileBot almost 4 yearsThis is not a real solution.
-
StackGU over 3 yearsI inserted the snippet in podfile but it doesn't work
-
FaultyJuggler over 3 yearsReverting to old systems isn't a fix
-
Miguel Espeso over 3 yearsHi @Tao-Nhan Nguyen, Where should I add the code it shows? Thank you
-
Asaf Pinhassi over 3 yearsNice! The colored log is very useful
-
LacOniC over 3 yearsInsert to Podfile in your Ios platform. You should "pod repo update" & "pod install" after insert.
-
Jimbali over 3 yearsThat directory didn't exist for me, but I just ran
cd ios && pod install && cd ..
and it started working again. -
Raphael Pinel over 3 yearsI got this error
[!] Invalid 'Podfile' file: [!] Specifying multiple 'post_install' hooks is unsupported.
but I don't see any other post_install in my podfile -
Oskar over 3 yearspost_install already exists because of the Flipper setup. You need to combine those into a single post_install
-
vr_driver over 3 yearsYou may want to raise this to 10 or 11. david-smith.org/iosversionstats
-
Tom about 3 yearsI'm very new to programming and I have no idea where to find that: 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 can you tell me where to find it?
-
Lane Faison about 3 years@Tom Add it to the end of your Podfile
-
Sigiria about 3 yearsWow, that worked for me after long time! Thank you!
-
Jithin U. Ahmed almost 3 yearsfor me the issue got solved only after changing the platform to 10(+)
-
Sras almost 3 yearsfatal error: 'Flutter/Flutter.h' file not found. after updating . i have this
-
edn over 2 yearsfatal error: 'Flutter/Flutter.h' file not found. after updating as suggested. Did not solve the problem for me..
-
bm888 over 2 yearsHere is the updated answer as of late 2021: stackoverflow.com/a/70316588/8094969
-
discodancer over 2 yearsHow to make these changes persist?
-
Nathan Tew over 2 yearsif anyone using this solution runs into
fatal error: 'Flutter/Flutter.h' file not found
, you can try adding this line:flutter_additional_ios_build_settings(target)
back underinstaller.pods_project.targets.each do |target|
. -
Nathan Tew over 2 yearsif anyone using this solution runs into
fatal error: 'Flutter/Flutter.h' file not found
, you can try adding this line:flutter_additional_ios_build_settings(target)
back underinstaller.pods_project.targets.each do |target|
. -
Franco Altuna over 2 yearswhere do you place this?
-
Ankit Maheshwari over 2 yearsThis helped me, thanks!
-
edn over 2 yearsDidn't work for me.
-
Yves Boutellier over 2 years@FrancoAltuna in your Podfile
-
tjpaul over 2 yearsIf you remove the deployment target for the pods, what happens in the scenario where the pod has a higher deployment target than the pods project? For example, what if the app had a deployment target of iOS 12 and the podfile specified iOS 12 so that the pods project had a deployment target of iOS 12, but one of the pods has a deployment target of iOS 13 and we just wiped out that deployment target. Would the app attempt to build the pod and produce an error for the pod that had a deployment target of iOS 13?
-
Matthew Rideout over 2 yearsThis worked for me with a recent flutter upgrade where iOS 10 is the new lowest target for Xcode 13.3. Just changed 8.0 to 10.0.