Xcode 12 deployment target warnings when using CocoaPods

aturan23 picture aturan23 · Jul 23, 2020 · Viewed 16.3k times · Source

I get this warning on Xcode 12:

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.0.99

How to support this version?

Answer

grighakobian picture grighakobian · Sep 19, 2020

A short working solution is here! Just copy and paste the code snippet below at the end of your Podfile and run pod install command.

    post_install do |installer|
     installer.pods_project.targets.each do |target|
         target.build_configurations.each do |config|
            if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
              config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
            end
         end
     end
  end