Xcode 8显示配置配置文件不包含签名证书的错误。

此问题仅适用于Xcode-8和Xcode 7,相同的配置文件显示相关已识别的证书。


当前回答

因为我还没有看到这个具体的答案:

我的问题是我需要手动签名。所以我的错误是在构建设置->代码签名->代码签名标识

我有我的调试(自动签名风格,和苹果开发证书),分期和发布(手动和苹果分发(adHoc)变种设置正确。

我没有正确设置(由于我理解中的一些有缺陷的逻辑)是“任何IOS SDK”的值。一旦我将其设置为相同的手动Apple Distribution证书,错误就消失了。

最初我把它设置为自动值“iOS分布”,因为我认为它会更好地自动处理,因为我不知道它是什么意思。还是不要。哦,希望能有所帮助

其他回答

这个问题似乎在Xcode 11开始出现。

去苹果开发者 找到正确的供应概要文件 单击右上角的“编辑” 在证书中选择(分发)选项。(我认为这是苹果公司引入的一种新的选项/证书类型,尽管我找不到任何文档) 可选:删除(~/Library/MobileDevice/Provisioning profiles /)中的所有配置文件 去Xcode ->首选项->帐户->下载手动配置

对于那些仍然在Xcode8中与这个问题作斗争的人。对于我来说,这是一个重复的证书问题,这是我解决它的方法:

我读了尼克的回答,然后开始了我的调查。我检查了我的特定案例中的所有密钥和证书(在~/Library/Keychains/System.keychain中)。

When I opened the file, I found that I had two iPhone Distribution Certificates (that was the certificate that Xcode was requesting me), one with the iOS Distribution private key that I have been using since the beginning, and another iPhone Distribution Certificate which its private Key had a name (iOS Distribution:NAME) that wasn´t familiar for me. I deleted this last certificate, started Xcode again and the problem was gone. xCode wasn´t able to resolve that conflict and that´s why it was giving signing certificate error all the time.

检查你的钥匙链,也许你有一个重复的证书。

我取消勾选,然后勾选“自动管理签名”选项。这为我解决了问题。

对于那些应该继续使用不自动的原因

打开keyChain访问,看看是否有两个相同的认证,如果有两个或更多,只需删除到一个,它将工作:)

I haven't seen this mentioned yet but if you are still having issues after recreating your provisioning profiles, deleting the existing ones you have in your Provision Profiles folder, checking for dupes in your Keychain, etc (all other answers ITT), open your Target > Build Settings > Code Signing and make sure everything looks consistent in there. For example, I had changed the Code Signing Identify for Debug to a Distribution identity, which obviously wouldn't work as the Development Provisioning Profile doesn't have the Distribution certificate and was causing the error in the first place.