多台Mac電腦使用同一個apple開發者賬號測試


我的情況是這樣的,公司有一個開發者賬號,我個人的機器上沒有裝開發者證書,寫的程序無法在真機上測試,因此我今天的任務就是在已有開發者賬號、證書的基礎上給自己電腦裝上。

 

  今天給自己的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文件,而是利用Xcode的organizer的IPHONE DEVELOPMENT ---》Developer Profile里自帶的Export和Import操作

  上述方法解決了一個很關鍵的問題:私有密鑰安裝問題,如果還有什么證書沒裝的可以參考下文共裝4個文件即可


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM