共享开发者账号

需要在创建了这个证书的 Mac 上导出证书对应的密钥。具体来说是到钥匙串中选择 key 分类并导出所有与开发证书相关的 key 信息。保存为 p12 格式。期间需要输入密码。别的 Mac 导入需要此密码。

补充,对于个人帐号(指的是在苹果开发者中心购买了个人帐户而非公司帐号),可以通过这个方法使得多台 Mac 参与开发,但是只有生成证书的那台才能够打包分发。

今天给自己的macbook装上了公司的apple开发者账号,以前总是用我的机器写代码但因为没有开发者账号不能给真机装也不能在真机上测试,想测试还需要把代码转移到其他机器上,很不方便,刚在网上找到一些方法装上了账号。感觉这个问题还是很普遍的,而且今天就为装这个也费了不少功夫有很多方法都没走成,因此把它总结出来,方便更多人能很快装上~

  我的情况是这样的,公司有一个开发者账号,我个人的机器上没有装开发者证书,写的程序无法在真机上测试,因此我今天的任务就是在已有开发者账号、证书的基础上给自己电脑装上。

  我之前是用账号登陆apple developer网站,从网站上下载了公共证书,但最后实验成功的那个帖子上没有以前做的那些步骤,他是直接从已安装好的机器上导出私有密钥的,具体方法如下:

  首先就是按照下面说的:

  When you request a certificate from the iPhone Provisioning Portal, a public/private key pair is generated. The public key is included in your certificate. The private key is stored in your keychain. With these items, Xcode code-signs the applications you build with it. If you need to use another computer to develop iOS applications, you must transfer these digital-identification items to the other computer. You can do this in the Xcode Organizer.

  To export your digital-identification items to a secure file, follow these steps:

  Open the Xcode Organizer.

  In the IPHONE DEVELOPMENT group, select Developer Profile.

  Click Export Developer Profile.

  Name the file, select a location for it, enter a password to secure the file, and click Save.

  Now, when you need to develop iOS applications on another computer, import your digital-identification items into it by performing these steps:

  Copy the developer-profile archive to the second computer.

  On the second computer, launch Xcode.

  Open the Organizer.

  In the IPHONE DEVELOPMENT group, select Developer Profile.

  Click Import Developer Profile.

  Locate the archive, enter the password used to secure it, and click Open.

  关键的一点就是不是直接从keychain里导出.cer文件,而是利用XcodeorganizerIPHONE DEVELOPMENT ---Developer Profile里自带的ExportImport操作

  上述方法解决了一个很关键的问题:私有密钥安装问题,如果还有什么证书没装的可以参考下文共装4个文件即可

http://blog.csdn.net/jianxuanlu/article/details/7291035 (共享开发者账号)

http://blog.csdn.net/totogogo/article/details/14454421   (很好的教程)

原文地址:https://www.cnblogs.com/yulang314/p/3580808.html