简体   繁体   English

证书和私钥对IOS

[英]Certificate and private key pair IOS

I am an iOs developer. 我是iOs开发人员。 In my job we have a mac mini with lion 10.7 and now we need to update it to be able to compile apps to iOs7. 在我的工作中,我们有一台配备lion 10.7的mac mini,现在我们需要对其进行更新,以便能够将应用程序编译为iOs7。

I installed a virtual machine for testing purposes before reinstall lion in mac mini. 在Mac mini中重新安装Lion之前,我已安装虚拟机进行测试。 So I can test xcode 5.I am not able to debug app in job's iphone. 因此,我可以测试xcode5。我无法在作业的iPhone中调试应用程序。

I connect with my account as I did in mac mini but each time I want to run the app in the iphone I get this message: 我就像在Mac mini中一样连接帐户,但是每次我要在iPhone中运行该应用程序时,都会收到以下消息:

No provisioning profiles with a valid signing identity (ie certificate and private key pair) were found. 找不到具有有效签名身份(例如,证书和私钥对)的供应配置文件。

After, xcode says it can fix it, I click there. 之后,xcode说它可以修复它,我单击此处。 Then I get other comment. 然后我得到其他评论。 "You are not allowed to perform this operation, Only agents and admins are allowed to add devices to this team... “不允许您执行此操作,仅允许代理和管理员向该小组添加设备...

Iphone is already added. Iphone已添加。 I was able to upload programs before update it. 我能够在更新之前上传程序。

I have email and password of my admin so I can access to add certifies or whatever I need. 我有管理员的电子邮件和密码,因此我可以访问以添加证书或任何我需要的内容。 The problem is that I don't know what I have to do. 问题是我不知道该做什么。

You should be able to fix this by exporting your Developer Profile from your Mac Mini, and importing it into your virtual machine. 您应该能够通过从Mac Mini导出开发人员配置文件并将其导入虚拟机来解决此问题。 See here for detailed instructions for both Xcode 4 and Xcode 5. 有关 Xcode 4和Xcode 5的详细说明, 请参见此处

The explanation is this: when you first generated your developer certificate on your mac mini, you sent Apple a certificate signing request. 解释是这样的:当您第一次在Mac mini上生成开发人员证书时,您向Apple发送了证书签名请求。 This entailed the creation of a public/private key pair, of which the public part was sent to Apple to be used for encryption and signature verification. 这需要创建一个公钥/私钥对,并将其中的公共部分发送给Apple以用于加密和签名验证。 The private key remained safely on your mac mini to be used for decrypting and signing purposes. 私钥安全地保留在Mac mini上,可用于解密和签名。

Now, your virtual machine is sorely missing that private key, and as a consequence all certificates and provisioning profiles you created in your account cannot be decrypted anymore and you virtual machine Xcode cannot sign whatever you would like to send Apple. 现在,您的虚拟机非常缺少该私钥,因此,您在帐户中创建的所有证书和置备配置文件都无法再解密,并且您的虚拟机Xcode无法签署您想要发送给Apple的任何文件。

The fix is copying over the public/private key pair to your virtual machine. 该修复程序将通过公钥/私钥对复制到您的虚拟机。 The post above describes how to entirely transfer your developer profile, but you could also do that from the Mac Keychain by exporting the private key associated to your developer certificates. 上面的文章介绍了如何完全转移您的开发者资料,但是您也可以通过导出与开发者证书关联的私钥从Mac钥匙串中进行转移。

As a last note, consider that the developer certificate you can download from Apple Developer website only contains the public portion of the key pair. 最后,请注意,您可以从Apple Developer网站下载的开发人员证书仅包含密钥对的公共部分。 The private key does only reside in your host. 私钥仅驻留在您的主机中。

Hope this helps. 希望这可以帮助。

Have you imported correctly you developer profile? 您是否正确导入了开发者资料?

If you go in Xcode - Preferences - Accounts you'll can see your apple id, clicking on View Details you can see your associated profiles, refresh your list and then in your building settings you'll be able to choose the right profile 如果您进入Xcode-首选项-帐户,您将看到您的Apple ID,单击“查看详细信息”,您可以看到关联的配置文件,刷新列表,然后在建筑物设置中选择正确的配置文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM