The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the rang...
產(chǎn)生原因:
在編譯cocoapods管理的三方庫時出現(xiàn)了這個警告议经,原因是該三方庫部署目標的系統(tǒng)版本最低要求是8.0,而Xcode支持的部署范圍是從11.0到14.2.99仅醇,不匹配所以報警了沿后。
解決方案:
將所有三方庫的部署版本號強制修改到Xcode支持的范圍內(nèi)试溯,代碼如下:
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 < 11.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
end