Xcode: how to export a developer profile to import it on another Mac

I need to export my developer profile from my old Mac and import it to another Mac, because I get the following error:

Your account already has a valid iOS Development certificate 

I found out that I can export it here: enter image description here

But on my mac I have 2 accounts, if I click on export accounts, do I export both of them? Because I just need one account. Is there any other solution? How to export the private key used to sign the iOS development certificate and import it on a new Mac?

+6
source share
2 answers

I would recommend not using the Xcode export option, but instead go to your Keychain Access.app and copy the key / certificate manually.

To do this, create a new keychain in Keychain Access (by default it will be saved in ~/Library/Keychains ). Select the login chain and then My Certificates in the Category section. You should now see your certificate in the right pane. On the left side there should be an arrow for disclosure, as well as a switch that should show you your secret key. Select the certificate and copy / paste it into the new keychain (do not drag it or it will remove it from login ).

Now you can copy this keychain to a new computer, open it in Keychain Access.app and copy the / cert switch to the login chain there.

And the reason I do not recommend using Xcode for this is precisely because you mention that it exports all accounts. In the past, I had clients who sent me their “developer key / certificate”, which included a key / certificate for dozens of other developers in their company.

+6
source

As I decided, it was:

  • export all accounts as your personal backup (it's good to have it in a safe place anyway if you lose your computer)
  • delete all developer accounts in the Xcode account manager (Xcode - Preferences - Accounts), except for the account you want to share with your team.
  • repeat the same backup/delete_all_but in the Xcode Keychain application for "my certificates" (not 100% sure that this is necessary, but it won’t hurt).
  • Export the remaining developer account from Xcode Account Manager and share it with your team.
  • import your backup so that everything on your computer again (and delete duplicates if necessary). You may need to log back into your Apple ID from Xcode Account Manager
0
source

All Articles