xcode 代码签名错误:身份“iPhone 开发人员”与默认钥匙串中的任何有效证书/私钥对都不匹配
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5472058/
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
Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain
提问by TheLearner
I am trying to create an ad hoc distribution of my App to send to a colleague.
我正在尝试创建我的应用程序的临时分发以发送给同事。
I am getting the following error when trying to Archive my project for distribution:
尝试存档我的项目以进行分发时出现以下错误:
Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain
代码签名错误:身份“iPhone 开发人员”与默认钥匙串中的任何有效证书/私钥对都不匹配
These are the steps which I have followed:
这些是我遵循的步骤:
- I have registered the device in the provisioning portal.
- I have generated a certificate signing request in keychain.
- Using this I have created a DISTRIBUTION certificate in the portal and dragged in keychain and I can see the key under the name.
- I have then created a DISTRIBUTION profile in the portal and downloaded it and dragged it into Xcode organiser. It appears to be valid in Organiser as there are no warnings.
- Now in the project properties I have choosen this profile in the code signing identity.
- 我已在配置门户中注册了该设备。
- 我在钥匙串中生成了证书签名请求。
- 使用它,我在门户中创建了一个 DISTRIBUTION 证书并将其拖入钥匙串中,我可以在名称下看到密钥。
- 然后我在门户中创建了一个 DISTRIBUTION 配置文件并将其下载并将其拖到 Xcode 管理器中。它似乎在 Organizer 中有效,因为没有警告。
- 现在在项目属性中,我在代码签名标识中选择了这个配置文件。
Now when I run i get this above error.
现在,当我运行时,出现上述错误。
回答by Iphone_bharat
It appears as if the profile has not been selected. Still "iPhone developer" is selected. Sometimes when I change it in my project properties, it doesn't automatically get reflected in target properties, so double click on your target and set the profile there.
看起来好像还没有选择配置文件。仍然选择“iPhone 开发人员”。有时当我在我的项目属性中更改它时,它不会自动反映在目标属性中,因此双击您的目标并在那里设置配置文件。
Some more steps you may have not done:
还有一些你可能没有做的步骤:
- I hope you are doing this all for "Distribution" configuration
- You have set your identifier in bundle of target properties as the identifier that you have given in profile, i.e. something like 'com.domainname.appname".
- 我希望你做这一切都是为了“分发”配置
- 您已将目标属性包中的标识符设置为您在配置文件中提供的标识符,即“com.domainname.appname”之类的内容。
回答by Sunil Targe
When I had this problem. I had followed these steps below.
当我遇到这个问题时。我已按照以下步骤操作。
Step 1:Open Certificate.p12 file on your machine (of course through key chain access) and install again by double click.
步骤1:在你的机器上打开Certificate.p12文件(当然是通过钥匙链访问),然后双击重新安装。
Step 2: It is now imported into your Key Chain.
第 2 步:它现在已导入到您的钥匙串中。
Step 3: Go to your project and set Code Signing Identity properly with your developer profile. You'll get resolved this problem.
第 3 步:转到您的项目并使用您的开发人员配置文件正确设置代码签名标识。你会得到解决这个问题。