我在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
在我的目标中
当前回答
简单的解决方案,对我来说在颤振:
删除Podfile和Podfile.lock 运行app:这将创建一个新的Podfile。这可能仍然会失败并报错。 在新的Podfile中,取消注释,并将第二行更改为平台:ios, '12.0'(或其他你想要目标的最小版本) 再次运行应用程序,现在没有错误
其他回答
这是我用Firebase 10.1和Xcode 14.1解决这个问题的方法:
打开Xcode 选择Product > Analyze,得到所有IPHONEOS_DEPLOYMENT_TARGET警告信息 打开终端,在你的项目目录:
Pod缓存清理-所有&& Pod分解&& Pod安装-回购-更新
再次检查Xcode。所有的警告都应该消失,Xcode的一个警告应该出现:“更新到推荐设置” 单击Perform Changes按钮 重启Xcode
在Firebase项目存储库中对此有详细的讨论。
如果你来自react-native,遇到这个错误,就这样做
打开Podfile(你的项目> ios>Podfile) podfile中的注释翻转函数如下所示
#use_flipper!
#post_install do |installer|
#flipper_post_install(installer)
#end
在终端内的IOS文件夹中输入此命令吊舱安装
是的,就是这样,希望对你有用
在我的情况下,我不小心导入了dart.js,所以如果它刚刚在重新加载或重新启动时停止工作,请检查您的导入
对于Flutter使用这个
platform :ios, '10.0'
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
迭代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