Xcode 9:配置文件由 Xcode 管理,但签名设置需要手动管理的配置文件

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

Xcode 9: Provisioning profile is Xcode managed, but signing settings require a manually managed profile

xcodeapp-store-connectprovisioning-profileios11xcode9

提问by C?ur

I need to archive my app for submission to iTunes Connect.

我需要存档我的应​​用程序以提交到 iTunes Connect。

It was OK with Xcode 8.3.3:
enter image description here

Xcode 8.3.3 没问题:
在此处输入图片说明

It's NOT OK with Xcode 9.0:
enter image description here

Xcode 9.0 不行:
在此处输入图片说明

When archiving, I get:

存档时,我得到:

Code Signing Error: Provisioning profile "XC iOS: *" is Xcode managed, but signing settings require a manually managed profile.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.0'

代码签名错误:配置文件“XC iOS:*”由 Xcode 管理,但签名设置需要手动管理的配置文件。
代码签名错误:SDK“iOS 11.0”中的产品类型“应用程序”需要代码签名

The two screenshots are taken from the same computer, same workspace. enter image description here

这两个屏幕截图来自同一台计算机,同一工作区。 在此处输入图片说明

I can't use "Automatic" because it would change the provisioning profile to a different one, then after uploading to iTunes Connect I would get:

我不能使用“自动”,因为它会将配置文件更改为不同的配置文件,然后在上传到 iTunes Connect 后我会得到:

Potential Loss of Keychain Access- The previous version of software has an application-identifier value of ['YBDK7H6MLG.com.ef.english24-7'] and the new version of software being submitted has an application-identifier of ['GEEM4BQ58H.com.ef.english24-7']. This will result in a loss of keychain access.

钥匙串访问的潜在丢失- 先前版本的软件具有 ['YBDK7H6MLG.com.ef.english24-7'] 的应用程序标识符值,并且正在提交的新版本软件具有 ['GEEM4BQ58H.com] 的应用程序标识符.ef.english24-7']。这将导致丢失钥匙串访问。

How do I make a release targeting iOS 11 without losing keychain access?

如何在不丢失钥匙串访问权限的情况下发布针对 iOS 11 的版本?

采纳答案by C?ur

Thanks to all for helping.

感谢大家的帮助。

Xcode 9 does not accept Xcode-generated Provisioning Profile (with "XC iOS" in the name). So the solution is to clone the Xcode-generated Provisioning Profile in a new one with a different name.

Xcode 9 不接受 Xcode 生成的配置文件(名称中带有“XC iOS”)。因此,解决方案是将 Xcode 生成的 Provisioning Profile 克隆到一个具有不同名称的新配置文件中。

  1. Ask your Team Agent to make you "Admin" in the team in order to manage provisioning profiles

  2. Create a new Provisioning Profile or Edit an existing one with:
    Edit Provisioning Profile

  3. Change the App ID to the one from Xcode:
    enter image description here

  4. Change the Certificate to the correct one (not necessarily the latest):
    enter image description here

  5. Click Generate

  6. Click Download

  7. Double-click it on your computer

  8. Select it for your signing:
    enter image description here

  9. Archive

  10. When exporting, check that your application-identifier and keychain-access-groups are correct:
    enter image description here

  1. 让您的团队代理将您设为团队中的“管理员”,以便管理配置文件

  2. 创建一个新的配置文件或编辑现有的配置文件:
    编辑配置文件

  3. 将 App ID 更改为 Xcode 中的 App ID:
    在此处输入图片说明

  4. 将证书更改为正确的(不一定是最新的):
    在此处输入图片说明

  5. 点击生成

  6. 点击下载

  7. 在您的计算机上双击它

  8. 选择它进行签名:
    在此处输入图片说明

  9. 档案

  10. 导出时,请检查您的应用程序标识符和钥匙串访问组是否正确:
    在此处输入图片说明

回答by Vitalii

Xcode 9 insists that the profile is "Xcode generated and doesn't support manual signing" simply because the profile has "XC" in its name.

Xcode 9 坚持认为配置文件是“Xcode 生成的,不支持手动签名”,因为配置文件的名称中包含“XC”。

The key fix here is to renamethe profile to a name without "XC" in it.

此处的关键修复是配置文件重命名为不含“XC”的名称。

After renaming the quickest way to use it is: choose your target > General > Signing (scheme name) > select Download Profile..., there select the newly renamed one.

重命名后最快的使用方法是:选择您的目标>常规>签名(方案名称)>选择下载配置文件...,然后选择新重命名的。

enter image description here

在此处输入图片说明

Repeat for all targets where needed. Done.

在需要的地方重复所有目标。完毕。