xcodecocoapodswarningsxcode12

Xcode 12 deployment target warnings when using CocoaPods


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?


Solution

  • A short working solution is here! Just copy and paste the code snippet at the end of your Podfile and run the 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 < 12.0
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
          end
        end
      end
    end
    

    In this case, 12.0 is the minimum supporting iOS version for AppStore submission. You can change it based on your project requirements.