I'm getting this below warning message in my Xcode 10.1.
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.
My simulator os in 12.1 Xcode 10.1
And i updated my pod file.
My deployment target is 9.0
In my target
This question is related to
ios
xcode
cocoapods
ios-simulator
google-fabric
If your are come from react-native
and facing this error just do this
Podfile
(your project > ios>Podfile)#use_flipper!
#post_install do |installer|
#flipper_post_install(installer)
#end
IOS
folder enter this command pod install
yep, that is it hope it works to you
We can apply the project deployment target to all pods target. Resolved by adding this code block below to end of your Podfile:
post_install do |installer|
fix_deployment_target(installer)
end
def fix_deployment_target(installer)
return if !installer
project = installer.pods_project
project_deployment_target = project.build_configurations.first.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
puts "Make sure all pods deployment target is #{project_deployment_target.green}"
project.targets.each do |target|
puts " #{target.name}".blue
target.build_configurations.each do |config|
old_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
new_target = project_deployment_target
next if old_target == new_target
puts " #{config.name}: #{old_target.yellow} -> #{new_target.green}"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = new_target
end
end
end
Results log:
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
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.
for cordova developers having this issue
try to set
<preference name="deployment-target" value="8.0" />
in confix.xml
Instead of specifying a deployment target in pod post install, you can delete the pod deployment target, which causes the deployment target to be inherited from the podfile platform.
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
in my case i have used both npm install
and yarn install
that is why i got this issue
so to solve this i have removed package-lock.json and node_modules
and then i did
yarn install
cd ios
pod install
it worked for me
Try these steps:
cd /ios
pod install
This was what worked for me.
if anybody is experiencing is issue while updating to the latest react native, try updating your pod file with
use_flipper!
post_install do |installer|
flipper_post_install(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
If anyone came here from react native issue, just delete the /build folder and type react-native run ios
Source: Stackoverflow.com