Xcode 错误:SDK“iOS 10.0”中的产品类型“应用程序”需要代码签名

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39524148/
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 10:10:38  来源:igfitidea点击:

Xcode error: Code signing is required for product type 'Application' in SDK 'iOS 10.0'

iosxcodexcode8ios10code-signing

提问by Hardik Parmar

I have Xcode 8 installed on OS X El Capitan.

我在 OS X El Capitan 上安装了 Xcode 8。

I get this error:

我收到此错误:

Signing for "target" requires a development team. Select a development team in the project editor.

Code signing is required for product type 'Application' in SDK 'iOS 10.0'

签署“目标”需要一个开发团队。在项目编辑器中选择一个开发团队。

SDK“iOS 10.0”中的产品类型“应用程序”需要代码签名

Xcode screenshot

Xcode 截图

采纳答案by Shrawan

With Xcode-8.1 & iOS-10.1

使用 Xcode-8.1 和 iOS-10.1

  1. Add your Apple ID in Xcode Preferences> Accounts> Add Apple ID:
  1. 在 Xcode Preferences> Accounts> 中添加您的 Apple ID Add Apple ID

Step 1

第1步

  1. Enable signing to Automatically && Select Team that you have created before:
  1. 启用自动签名&&选择您之前创建的团队:

Step 2

第2步

  1. Change the Bundle Identifier:
  1. 更改捆绑标识符:

Step 3

第 3 步

  1. Code Signing to iOS Developer:
  1. 代码签名给 iOS 开发者:

Step 4

第四步

  1. Provision profile to Automatic:
  1. 将配置文件配置为自动:

Step 5

第 5 步

You can now run your project on a device!

您现在可以在设备上运行您的项目!

回答by Ketan Parmar

To add developer account to Xcode:

要将开发者帐户添加到 Xcode:

  1. Press Cmd ?+ ,(comma)

  2. Go to Accountstab

  3. Follow the screen shot below to enable development team:

  1. Cmd ?+ ,(逗号)

  2. 转到Accounts选项卡

  3. 按照下面的屏幕截图启用开发团队:

Step 3

第 3 步

回答by Alexander Vitanov

In case you are still having this problem, click on the Tests and select a team for them too.

如果您仍然遇到此问题,请单击“测试”并为他们选择一个团队。

回答by Joshua Dance

To run your app on a real device, you need to have an Apple ID, and have registered your device with that ID. That is why you are getting this error.

要在真实设备上运行您的应用程序,您需要有一个 Apple ID,并使用该 ID 注册您的设备。这就是您收到此错误的原因。

Here's how you do it.

这是你如何做到的。

  1. Go to the project Navigator. Cmd-1if you can't find it.

  2. Click the project target dropdown and pick Target. enter image description here

  3. Click on the Team dropdown and pick add an account. enter image description here

  4. Sign in with your Apple ID that is linked to your developer account, or just your Apple if you don't have a dev account.

  5. If you haven't registered your device with that account yet, a button will appear, something like 'Register device'. Click that and Apple will register the device and do the certificates and code signing. (Oh my unicorns certificates and signing is so much easier than it used to be) enter image description here

  1. 转到项目导航器。Cmd-1如果你找不到它。

  2. 单击项目目标下拉列表并选择目标。 在此处输入图片说明

  3. 单击团队下拉菜单并选择添加帐户。 在此处输入图片说明

  4. 使用与开发者帐户关联的 Apple ID 登录,如果没有开发者帐户,则仅使用 Apple 登录。

  5. 如果您尚未使用该帐户注册您的设备,则会出现一个按钮,类似于“注册设备”。单击它,Apple 将注册设备并进行证书和代码签名。(哦,我的独角兽证书和签名比以前容易多了) 在此处输入图片说明

Pick your physical device and hit run and it should load onto your device without error.

选择您的物理设备并点击运行,它应该可以正确加载到您的设备上。

回答by Cyrus Zei

Well, after I did all those things I still got the errors so I closed Xcode and opened it up again and then it worked.

好吧,在我做了所有这些事情之后,我仍然遇到错误,所以我关闭了 Xcode 并再次打开它,然后它就可以工作了。

回答by Yunus Nedim Mehel

Recently had the issue on Xcode 11beta 2:

最近在Xcode 11beta 2上遇到了问题:

  1. Select your project on the left side panel
  2. Find the "Signing & Capabilities" tab for your target
  1. 在左侧面板上选择您的项目
  2. 找到目标的“签名和功能”选项卡

If your target doesn't have the "Signing & Capabilities" tab (in my case only the test target had it), open the build settings for your project and click "All" instead of "Basic"/"Customised". Find signing under the settings and make sure you've got a Development team set up.

如果您的目标没有“签名和功能”选项卡(在我的情况下只有测试目标有),请打开项目的构建设置并单击“全部”而不是“基本”/“自定义”。在设置下找到签名并确保您已经建立了一个开发团队。

  1. Repeat the same step for your test target if needed
  1. 如果需要,对您的测试目标重复相同的步骤

回答by Hany Sakr

If you need to disable the team for now, as you don't have a development account, just change the target at the top menu to iPhone instead of generic iOS device or real device.

如果您现在需要禁用团队,因为您没有开发帐户,只需将顶部菜单中的目标更改为 iPhone,而不是通用 iOS 设备或真实设备。

回答by Ricky Levi

For those using Ionicand receiving this error - you need to open your $project_dir/platform/ios/$project_name.xcodeproj- then follow the steps listed in the "answer"

对于那些使用Ionic和收到此错误的人 - 您需要打开您的$project_dir/platform/ios/$project_name.xcodeproj- 然后按照“答案”中列出的步骤操作

回答by Michal Shatz

Select team in the general settings of the target

在目标的常规设置中选择团队

回答by ZaMy

For those that are going to come here after me, if it's Xcode 11 and ios 13 then your layout might look a little different than what you see in the main answer to this question.

对于那些将在我之后来到这里的人,如果是 Xcode 11 和 ios 13,那么您的布局可能与您在此问题的主要答案中看到的略有不同。

Firstly do this as it was mentioned on the answer, Add your Apple ID in Xcode Preferences > Accounts > Add Apple ID.

首先按照答案中的说明执行此操作,在 Xcode Preferences > Accounts > Add Apple ID 中添加您的 Apple ID。

Then click on the project name which is located in the left panel then you'll get a window of settings then look for signing & Capabilities and that's where you'll be able to see "Team" and select your name as the option. enter image description here

然后单击位于左侧面板中的项目名称,然后您将看到一个设置窗口,然后查找签名和功能,在那里您将能够看到“团队”并选择您的姓名作为选项。 在此处输入图片说明