Xcode 12 deployment target warnings when use CocoaPods
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
This is a problem with the target at your cocoa pods. To me, the answer was to put this code at the end of your pod file:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf'
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
end
end
end
It resolved all my problems, compiling and archiving the project.
Another way is just to change the IPHONEOS_DEPLOYMENT_TARGET
in the pods project like described in this image:
Best regards.
Update: To fix this issue you just need to update the Deployment Target
to 9.0
. This can be updated by opening the .xcworkspace
file, choose the Pods.xcodeproj
on Xcode, and updating the iOS Deployment Target
to 9.0
or later as depicted in the below image.
Another easy fix is to add the following to your Podfile
and running pod intall
on terminal in the directory.
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
Previous: You can't provide support for iOS 8.0
on Xcode 12
unless you import the support files. To provide support by default you would have to use Xcode 11
. It would be better to check for the number of users that use your app on iOS 8
and update the minimum supported version to iOS 9
or higher.