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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/54704207/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 09:50:37  来源:igfitidea点击:

The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1

iosxcodecocoapodsios-simulatorgoogle-fabric

提问by iOS

I'm getting this below warning message in my Xcode 10.1.

我在 Xcode 10.1 中收到以下警告消息。

The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1.

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

My simulator os in 12.1 Xcode 10.1

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

And i updated my pod file.

我更新了我的 pod 文件。

enter image description here

在此处输入图片说明

My deployment target is 9.0

我的部署目标是 9.0

enter image description here

在此处输入图片说明

In my target

在我的目标

enter image description here

在此处输入图片说明

采纳答案by iOS

I solved this problem, I changed build systemto Legacy Build Systemfrom New Build System

我解决了这个问题,我将构建系统更改Legacy Build SystemNew Build System

In Xcode v10+, select File > Project Settings

在 Xcode v10+ 中,选择文件 > 项目设置

In previous Xcode, select File > Workspace Settings

在以前的 Xcode 中,选择 File > Workspace Settings

enter image description here

在此处输入图片说明

Change Build System to Legacy Build Systemfrom New Build System--> Click Done.

将构建系统更改为Legacy Build SystemNew Build System--> 单击完成。

enter image description here

在此处输入图片说明

回答by Tao-Nhan Nguyen

You can setup your podfile to automatically match the deployment target of all the podfiles to your current project deployment target like this :

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

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

回答by Ahmed El-Bermawy

The problem is in your pod files deployment target iOS Version not in your project deployment target iOS Version, so you need to change the deployment iOS version for your pods as well to anything higher than 8.0 to do so open your project workspace and do this:

问题在于您的 pod 文件部署目标 iOS 版本而不是您的项目部署目标 iOS 版本,因此您需要将 pod 的部署 iOS 版本更改为高于 8.0 的任何版本,以便打开您的项目工作区并执行以下操作:

1- Click on pods.

1- 单击豆荚。

2- Select each project and target and click on build settings.

2- 选择每个项目和目标,然后单击构建设置。

3- Under Deployment section change the iOS Deployment Target version to anything more than 8.0 (better to try the same project version).

3- 在部署部分下,将 iOS 部署目标版本更改为 8.0 以上的版本(最好尝试相同的项目版本)。

4- Repeat this for every other project in your pods then run the app.

4- 对 pod 中的每个其他项目重复此操作,然后运行该应用程序。

see the photo for details enter image description here

详情请看照片 在此处输入图片说明

回答by Robinson Silva Junior

If anyone came here from react native issue, just delete the /build folder and type react-native run ios

如果有人因为反应本机问题来到这里,只需删除 /build 文件夹并键入 react-native run ios

回答by Patrick Kelly

Try these steps:

尝试以下步骤:

  1. Delete your Podfile.lock
  2. Delete your Podfile
  3. Build Project
  4. Add initialization code from firebase
  5. cd /ios
  6. pod install
  7. run Project
  1. 删除你的 Podfile.lock
  2. 删除你的 Podfile
  3. 构建项目
  4. 从 firebase 添加初始化代码
  5. cd /ios
  6. pod install
  7. 运行项目

This was what worked for me.

这对我有用。

回答by MUHAMMAD HARIB SIDDIQUE

Follow the next steps

按照以下步骤操作

1- Click on pods.

1- 单击豆荚。

2- Select each project and target and click on build settings.

2- 选择每个项目和目标,然后单击构建设置。

3- Under development section change iOS version to anything more than 8.0 (better to try the same project version).

3- 在开发部分将 iOS 版本更改为 8.0 以上的任何版本(最好尝试相同的项目版本)。

4- Repeat this for every other project in your pods then run the app.

4- 对 pod 中的每个其他项目重复此操作,然后运行该应用程序。

solution

解决方案

回答by CGN

try to set

尝试设置

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

in confix.xml

在 confix.xml 中