我在Xcode 10.1中得到了下面的警告信息。
iOS Simulator部署目标设置为7.0,但此平台支持的部署目标版本范围为8.0到12.1。
我的模拟器操作系统是12.1 Xcode 10.1
我更新了pod文件。
我的部署目标是9.0
在我的目标中
我在Xcode 10.1中得到了下面的警告信息。
iOS Simulator部署目标设置为7.0,但此平台支持的部署目标版本范围为8.0到12.1。
我的模拟器操作系统是12.1 Xcode 10.1
我更新了pod文件。
我的部署目标是9.0
在我的目标中
当前回答
我解决了这个问题,我把build system从New build system改为Legacy build system
在Xcode v10+中,选择文件>项目设置
在之前的Xcode中,选择File > Workspace Settings
将Build System从New Build System更改为Legacy Build System—>单击Done。
其他回答
无需在pod安装后指定部署目标,您可以为每个pod删除pod部署目标,这将导致部署目标从Podfile继承。
您可能需要运行pod install以使效果发生。
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
对于有此问题的cordova开发者
试着设置
<preference name="deployment-target" value="8.0" />
在config . xml
这个方法在扑动的时候对我很有效。打开{your_project_root_folder}/ios/Podfile,用这个替换post_install块
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
如果有人在2021年将XCode更新到v13后遇到这个问题,这里有一个对我有效的修复方法:
https://github.com/facebook/react-native/issues/31733#issuecomment-924016466
然而,这可能不适用于所有react-native版本,它在v0.64上为我工作。
我用Xcode创建了一个虚拟swift文件,所以我自动得到了一个“桥接头”的请求
希望这个问题能在未来的版本中得到解决。
首先将部署更改为您所选择的:例如'11.0' 并将此步骤添加到pod文件的最后
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end