我在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。

其他回答

对于有此问题的cordova开发者

试着设置

<preference name="deployment-target" value="8.0" />

在config . xml

无需在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

以上的大部分方法对我都不起作用。如果你挖掘周围,你会发现你不应该手动运行pod安装。对我来说,有效的方法是确保我的物理设备在xcode中注册。

打开ios的xcode工作区。选择你的设备(最可能是通过usb连接的),然后单击运行。这将提示你让xcode注册你的设备。 Xcode构建很可能会失败,这没关系-请参见下一步 Xcode辞职! cd ios rm -fR Podfile Podfile。锁豆荚 在android studio中选择有问题的设备和c

迭代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

对于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