ios 证书不会显示在构建设置中的代码签名标识中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17388600/
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
Certificates won't show in code signing identity in build settings
提问by Toby
I'm encountering the errors:
我遇到了以下错误:
No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found.
未找到匹配的配置文件:未找到具有有效签名身份(即证书和私钥对)的配置文件。
and:
和:
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'
CodeSign 错误:SDK“iOS 7.0”中的产品类型“应用程序”需要代码签名
XCode isn't giving me any option other than "Automatic iOS Developer and Distribution" options in the 'Code Signing' area of the 'Build Settings'.
除了“构建设置”的“代码签名”区域中的“自动 iOS 开发人员和分发”选项之外,XCode 没有给我任何选项。
I've tried changing the bundle id to match the certificates exactly, as well as a more generic com.domain.appname ID, I've deleted and recreated the provisioning profiles - I'm really lost, it feels like it should be something really simply but I can't get my certificates to show in the settings.
我已经尝试更改捆绑包 ID 以与证书完全匹配,以及更通用的 com.domain.appname ID,我已经删除并重新创建了配置文件 - 我真的很迷茫,感觉它应该是什么真的很简单,但我无法在设置中显示我的证书。
采纳答案by Dan
The first thing I would check is that your Cert in Keychain Access is present and is married up to your private key. If it's listed but your private key isn't paired with it you've likely changed your Mac's password recently and instead of pressing "Update Keychain" you may have clicked on "New Keychain". This will require performing the CSR process again and adding that new cert from the portal to the existing prov profiles. (A screenshot here may help).
我要检查的第一件事是您的钥匙串访问证书存在并且与您的私钥结合。如果它已列出但您的私钥未与其配对,则您可能最近更改了 Mac 的密码,而不是按“更新钥匙串”,您可能点击了“新钥匙串”。这将需要再次执行 CSR 流程并将该新证书从门户添加到现有的 prov 配置文件中。(此处的屏幕截图可能会有所帮助)。
Next I would make sure that XCode's Organizer is showing your provisioning profiles as valid with a green checkmark. If they aren't valid XCode will tell you why. This could be anything from the missing private key to your cert wasn't added to the profile in the dev portal. (Another screenshot here may help).
接下来,我将确保 XCode 的管理器将您的配置文件显示为有效并带有绿色复选标记。如果它们无效,XCode 会告诉您原因。这可能是从丢失的私钥到您的证书未添加到开发门户中的配置文件的任何内容。(此处的另一个屏幕截图可能会有所帮助)。
If all of that looks good restart XCode. I've had problems with XCode not properly importing prov profiles until I give it a swift kick in the pants via restart.
如果所有这些看起来都不错,请重新启动 XCode。我遇到了 XCode 无法正确导入 prov 配置文件的问题,直到我通过重新启动快速启动它。
回答by letmeknow
I was shocked when having the same problem and reading some answers here, too complicated. But I solved this much much simpler.
当我遇到同样的问题并在这里阅读一些答案时感到震惊,太复杂了。但我解决这个问题要简单得多。
Open Keychain Access. Delete iPhone Developer and iPhone Distribution certificates, although they are still valid.
Open Apple Developer Centre. Download iOS Development and iOS Distribution certificates again. Yes, I download them again as they are written as XXXX-1.cer
Drag them to Keychain Access to reimport them.
Rerun XCode. Problem solved.
打开钥匙串访问。删除 iPhone Developer 和 iPhone Distribution 证书,尽管它们仍然有效。
打开苹果开发者中心。再次下载 iOS 开发和 iOS 分发证书。是的,我再次下载它们,因为它们写成 XXXX-1.cer
将它们拖到 Keychain Access 以重新导入它们。
重新运行 XCode。问题解决了。
回答by Renaud Montes
What worked for me was to create a new iOS Provisioning Profile in apple portal then download and add it to the Organizer in XCode , my scenario was that I was importing the project from another user account and when Titanium was compiling the project had the iOS Provisioning Profile associated from the other user account therefore was crashing, so when I was ready to compile in the Run on iOS Device dialog I changed the Provisioning profile to the new one. As it has been stated before, you need to see the green button (valid profile) in the Provisioning Profiles for your device .
对我有用的是在苹果门户中创建一个新的 iOS 配置文件,然后将其下载并添加到 XCode 中的管理器中,我的情况是我从另一个用户帐户导入项目,并且当 Titanium 编译项目时有 iOS 配置因此,与其他用户帐户关联的配置文件崩溃了,因此当我准备在“在 iOS 设备上运行”对话框中进行编译时,我将配置配置文件更改为新的配置文件。如前所述,您需要在设备的配置文件中看到绿色按钮(有效的配置文件)。
Good luck! it took me two days to fix this!
祝你好运!我花了两天时间才解决这个问题!
Ren@ud
仁@ud