Xcode 9 自动签名失败

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

Xcode 9 automatic signing failing

xcodecode-signing

提问by GenericPtr

I had successfully uploaded an app for TestFlight but after archiving and uploading now it is giving me this error I can't explain. Just to make sure I unchecked all entitlements in the capabilities target tab but that doesn't seem to matter.

我已经成功地为 TestFlight 上传了一个应用程序,但现在存档和上传后,它给了我这个我无法解释的错误。只是为了确保我取消选中功能目标选项卡中的所有权利,但这似乎无关紧要。

I looked over all the app id's, certificates and provisioning profiles but there's nothing that looks abnormal. I would look in the actual .plist file generated by Xcode but I don't see where it is or if it even exists. Where should I even check to verify what's going on? Xcode is a buggy mess so I don't even trust this isn't some random bug (I cleaned the target of course just to make sure).

我查看了所有应用程序 ID、证书和配置文件,但没有任何异常。我会查看由 Xcode 生成的实际 .plist 文件,但我看不到它在哪里,或者它是否存在。我应该在哪里检查以验证发生了什么?Xcode 是一团糟,所以我什至不相信这不是一些随机错误(我当然清理了目标只是为了确保)。

Automatic signing is unable to resolve an issue with the "..." target's entitlements. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code. Then rebuild your archive and try again.

Provisioning profile failed qualification Profile doesn't match the entitlements file's value for the application-identifier entitlement.

自动签名无法解决“...”目标的权利问题。切换到手动签名并通过从开发人员网站下载匹配的配置文件来解决问题。或者,要继续使用自动签名,请从您的权利文件中删除这些权利,并从您的代码中删除它们的相关功能。然后重建您的存档并重试。

供应配置文件失败的资格配置文件与应用程序标识符权利的权利文件值不匹配。

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

回答by matt

I had a terrible time with some old projects where I had to use manual signing because I couldn't get automatic provisioning to work. Then I discovered the following solution, which has worked for me 100%:

我在一些旧项目中度过了一段糟糕的时光,我不得不使用手动签名,因为我无法让自动配置工作。然后我发现了以下解决方案,它对我 100% 有效:

  1. Switch to automatic provisioning if you haven't already.

  2. Edit the target build settings and search for Sign. You should see four Code Signing Identity entries and they should all say iOS Developer. (If one of them says iOS Distribution, that's the kiss of death.)

  3. Still editing the target build settings, search for Provision. Scroll down to the bottom and see if there is an explicit extra provisioning profile setting giving a profile number. If so, delete it.

  1. 如果您还没有,请切换到自动配置。

  2. 编辑目标构建设置并搜索 Sign。您应该会看到四个 Code Signing Identity 条目,它们都应该显示为 iOS Developer。(如果其中一个说 iOS 发行版,那就是死亡之吻。)

  3. 仍在编辑目标构建设置,搜索 Provision。向下滚动到底部,查看是否有明确的额外配置文件设置提供配置文件编号。如果是,请删除它。

enter image description here

在此处输入图片说明

  1. Edit the target capabilities. Turn Game Center and iCloud and In-App Purchase on. Now turn them off again. This will give you an empty entitlements file (you can confirm this in the project navigator).
  1. 编辑目标能力。打开 Game Center 和 iCloud 以及应用内购买。现在再次关闭它们。这将为您提供一个空的权利文件(您可以在项目导航器中确认)。

You will now be able to build to a device, archive, and export to the App Store, using automatic signing throughout.

您现在可以使用自动签名在设备上构建、存档和导出到 App Store。

回答by OrieltonJohn

I have had a very similar issue with Xcode 9.4, the only difference being that the error referred to issues with both the application identifier and keychain access groups entitlements.

我在 Xcode 9.4 中遇到了一个非常相似的问题,唯一的区别是该错误涉及应用程序标识符和钥匙串访问组权利的问题。

I switched from automatic Xcode signing to manual signing to try to fix the problem. After some mucking about that did not help (and that I don't think contributed to fixing the problem) I ended up re-enabling the Xcode automatic signing. This appears to have fixed the problem. I was able to clean, archive and upload without any issues.

我从自动 Xcode 签名切换到手动签名以尝试解决问题。在对此进行了一些讨论后没有帮助(而且我认为这对解决问题没有帮助)我最终重新启用了 Xcode 自动签名。这似乎解决了问题。我能够毫无问题地清理、存档和上传。

Not a particularly satisfying answer, but it worked for me.

不是一个特别令人满意的答案,但它对我有用。