我在Xcode 10.1中得到了下面的警告信息。

iOS Simulator部署目标设置为7.0,但此平台支持的部署目标版本范围为8.0到12.1。

我的模拟器操作系统是12.1 Xcode 10.1

我更新了pod文件。

我的部署目标是9.0

在我的目标中


当前回答

这个方法在扑动的时候对我很有效。打开{your_project_root_folder}/ios/Podfile,用这个替换post_install块

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end

其他回答

试试下面这些步骤:

删除Podfile.lock 删除你的Podfile 建设项目 从firebase添加初始化代码 cd / ios 圆荚体安装 运行项目

这对我来说很管用。

您可以设置您的podfile自动匹配所有podfile的部署目标到您当前的项目部署目标,如下所示:

post_install do |installer|
 installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
   config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
  end
 end
end

首先将部署更改为您所选择的:例如'11.0' 并将此步骤添加到pod文件的最后

end
post_install do |installer|
 installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
   config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
  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。

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