xcode 证书和私钥对 IOS
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19320275/
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
Certificate and private key pair IOS
提问by Biribu
I am an iOs developer. 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.
我是一名 iOS 开发者。在我的工作中,我们有一台带有 Lion 10.7 的 mac mini,现在我们需要更新它才能将应用程序编译为 iOs7。
I installed a virtual machine for testing purposes before reinstall lion in mac mini. So I can test xcode 5.I am not able to debug app in job's iphone.
在 mac mini 中重新安装 Lion 之前,我安装了一个虚拟机用于测试目的。所以我可以测试 xcode 5。我无法在工作的 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 (i.e. certificate and private key pair) were found.
没有找到具有有效签名身份(即证书和私钥对)的配置文件。
After, xcode says it can fix it, I click there. 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...
之后,xcode 说它可以修复它,我点击那里。然后我得到其他评论。“您无权执行此操作,仅允许代理和管理员向此团队添加设备...
Iphone is already added. I was able to upload programs before update it.
Iphone 已经添加。我能够在更新之前上传程序。
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.
我有我的管理员的电子邮件和密码,因此我可以访问以添加证书或我需要的任何内容。问题是我不知道我必须做什么。
采纳答案by sergio
You should be able to fix this by exporting your Developer Profilefrom your Mac Mini, and importing it into your virtual machine. See herefor detailed instructions for both Xcode 4 and Xcode 5.
您应该能够通过从 Mac Mini导出开发人员配置文件并将其导入虚拟机来解决此问题。有关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. 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. The private key remained safely on your mac mini to be used for decrypting and signing purposes.
解释是这样的:当你第一次在你的 mac mini 上生成你的开发者证书时,你向 Apple 发送了一个证书签名请求。这需要创建一个公钥/私钥对,其中的公共部分被发送给 Apple 用于加密和签名验证。私钥安全地保存在您的 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. The private key does only reside in your host.
最后要注意的是,您可以从 Apple Developer 网站下载的开发者证书仅包含密钥对的公共部分。私钥仅驻留在您的主机中。
Hope this helps.
希望这可以帮助。
回答by Lucabro
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 - Preferences - Accounts 你会看到你的 apple id,点击 View Details 你可以看到你相关的配置文件,刷新你的列表,然后在你的构建设置中你就可以选择正确的配置文件