我在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
在我的目标中
当前回答
这是我用Firebase 10.1和Xcode 14.1解决这个问题的方法:
打开Xcode 选择Product > Analyze,得到所有IPHONEOS_DEPLOYMENT_TARGET警告信息 打开终端,在你的项目目录:
Pod缓存清理-所有&& Pod分解&& Pod安装-回购-更新
再次检查Xcode。所有的警告都应该消失,Xcode的一个警告应该出现:“更新到推荐设置” 单击Perform Changes按钮 重启Xcode
在Firebase项目存储库中对此有详细的讨论。
其他回答
对于flutter,这是我在<project_root>/ios/Podfile中使用的
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS"] = "armv7"
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
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
对我有用:
rm ios/Podfile
flutter pub upgrade
flutter pub get
cd ios && pod update
flutter clean && flutter run
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
您所需要做的就是取消下面这一行的注释
# platform :ios, '8.0'
OR
# platform :ios, '9.0'
等等……
然后打开终端的iOS文件夹,传递这些命令:
% pod repo update
% pod install
对于有此问题的cordova开发者
试着设置
<preference name="deployment-target" value="8.0" />
在config . xml