我在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
在我的目标中
当前回答
为迅速
如果你在Xcode 12中使用CocoaPods,那么你可能会看到这个错误:
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.
这是因为对iOS 8的支持已经放弃,但pod的最低部署目标是iOS 8。
在此问题解决之前,您可以将以下内容添加到Podfile中:
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
这将从项目中的所有pod中删除部署目标,并允许它们继承在Podfile顶部指定的项目/工作区部署目标。
对于React Native
删除。/project-root/ios/build文件夹,输入react-native run ios
为科尔多瓦
<preference name="deployment-target" value="8.0" />
其他回答
Xcode > Runner >信息部署目标> IOS部署目标:11 .
开放终端:
pod cache clean --all
.
pod update
如果有人从react native issue来这里,只需删除/build文件夹并输入react-native run ios
迭代Tao-Nhan Nguyen的答案,计算每个pod的原始值集,只在它不大于8.0时调整它……在Podfile中添加以下内容:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if Gem::Version.new('8.0') > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
end
end
end
end
如果你来自react-native,遇到这个错误,就这样做
打开Podfile(你的项目> ios>Podfile) podfile中的注释翻转函数如下所示
#use_flipper!
#post_install do |installer|
#flipper_post_install(installer)
#end
在终端内的IOS文件夹中输入此命令吊舱安装
是的,就是这样,希望对你有用
在我的情况下,我不小心导入了dart.js,所以如果它刚刚在重新加载或重新启动时停止工作,请检查您的导入