我在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
在我的目标中
当前回答
您所需要做的就是取消下面这一行的注释
# platform :ios, '8.0'
OR
# platform :ios, '9.0'
等等……
然后打开终端的iOS文件夹,传递这些命令:
% pod repo update
% pod install
其他回答
我在构建React Native项目时也遇到了同样的问题
Cocoapods版本更新对我有效(从1.8.4升级到1.11.2)
在我的情况下,我不小心导入了dart.js,所以如果它刚刚在重新加载或重新启动时停止工作,请检查您的导入
我们可以将项目部署目标应用于所有pods目标。 通过在Podfile的末尾添加以下代码块来解决:
post_install do |installer|
fix_deployment_target(installer)
end
def fix_deployment_target(installer)
return if !installer
project = installer.pods_project
project_deployment_target = project.build_configurations.first.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
puts "Make sure all pods deployment target is #{project_deployment_target.green}"
project.targets.each do |target|
puts " #{target.name}".blue
target.build_configurations.each do |config|
old_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
new_target = project_deployment_target
next if old_target == new_target
puts " #{config.name}: #{old_target.yellow} -> #{new_target.green}"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = new_target
end
end
end
结果记录:
我解决了这个问题,我把build system从New build system改为Legacy build system
在Xcode v10+中,选择文件>项目设置
在之前的Xcode中,选择File > Workspace Settings
将Build System从New Build System更改为Legacy Build System—>单击Done。
对我有用:
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