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

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


当前回答

出现这种情况是因为配置配置文件无法找到它所链接的证书的文件。

修复:

检查哪个证书链接到您的配置配置文件 在Apple Developer仪表板的Certificates, Identifiers & Profiles部分点击编辑你的配置文件 从仪表板下载证书 双击该文件将其安装到您的钥匙链中 将文件拖到Xcode中以确保它是链接的

错误现在应该消失了。

其他回答

如果你使用手动签名(我非常鼓励),这个错误可能会发生,因为Xcode认为它应该用开发人员证书来签署发布版本,而这显然不包括在发布配置文件中。

有一个生成设置定义了哪个证书应该用于哪个生成配置。要更改它,请转到构建设置并搜索代码签名标识。当展开时,每个构建配置(通常是调试和发布)都应该有单独的行,第二列是其选择的标识(通常是iOS Developer或iOS Distribution)。确保为每个构建配置设置了正确的标识。

在某些情况下,还可以扩展构建配置。确保它的子项也被设置为正确的标识。

我收到了苹果公司的一封邮件:

Dear John Doe, The following certificate has either been revoked by a member of your development team or has expired: Certificate: iOS Development Team Name: Honey Team, LLC This does not affect apps that you've submitted to the App Store or your ability to update your apps. If you're using provisioning profiles that contain this certificate, they must be recreated before they can be reused. For details, see the "App signing overview" section of Xcode Help. Best regards, Apple Developer Program Support


我创建了一个新证书,撤销了之前的证书(在本地和任何其他开发人员的mac上)。为了让它工作,我必须下载新的配置文件。

解决方案是:

登录到苹果开发者帐户 删除/撤销以前以我的名字创建的证书。 将新的证书添加到供应配置文件中。您可以根据有效期来识别较新的 再次从Xcode下载。下载所有配置文件 重启Xcode

我个人没有这样的机会。这种访问权限只对我们团队的管理员开放,因此我没有截图,也不确定这些步骤是否100%正确。

对于那些仍然在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.

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

检查您的钥匙串,查找缺少私钥的身份。我为同一个团队安装了多个分发证书,其中一个缺少私钥。Xcode只检查密钥链中第一个匹配的标识,并自动使用这个标识,而不是包含私钥的标识。

删除没有私钥的匹配标识使Xcode再次检测到正确的标识。

我有我撤销的证书的剩余私钥,证书没有了,但私钥没有。删除它们就解决了问题。

要找到他们:

打开钥匙串访问 点击左侧菜单类别下的“键” 寻找未绑定证书的iOS Developer:…"密钥 我删除了它们,问题就解决了

图中高亮显示的密钥是一个没有证书的样例私钥。