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

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


当前回答

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.

其他回答

点击然后取消“启用自动签名”对我来说是有效的,尽管它所做的实际改变是:

Always_embed_swift_standard_libraries = yes;

或者在Xcode中,它被称为始终嵌入Swift标准库

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

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

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

如果您尝试将应用程序上传到iTunes Connect(您的供应配置文件设置为分发),请转到项目设置->构建设置->代码签名。请确保将所有调试和发布选项设置为您的分发配置文件。

此问题是由于您的配置文件中的证书中的私钥与您的密钥链中的私钥不匹配。我解决这个问题的方法是

delete all iPhone Developer certificate in keychain. delete all certificate in apple account. using xcode "Manage Certificates" to add certificate, sometime you still have certificate in your Mac, but I do not know where it is for now, and if added successfully, your apple account will display that certificate too, and then you can create your profile with that certificate and download ... goto 5 if you use "Manage Certificates" can't add certificate, you can create a new certificate, and do remain steps. finish.

Xcode版本8的代码签名问题也是如此。

这意味着你需要做以下任何一件事:

你应该已经在开发者中心创建了一个证书,然后将该证书包含在配置文件中,然后导入到XCode中。 否则,如果您使用的证书是由其他人创建的,那么让他们共享/导出他们的证书和私钥(。P12文件)给你,你需要包括这个到你的钥匙链。请参考这里

当您无法从创建者那里获得证书& .p12文件时,#2的解决方案是选中“自动管理签名”选项。