Xcode: How to export a developer profile in order to import it on another Mac

The way I solved it was to:

  1. export all accounts as your personal backup (good to have in a secure place anyway, in case you lose your machine)
  2. delete all developer accounts in Xcode Accounts manager (Xcode - Preferences - Accounts) except for the account you want to share with your team
  3. repeat the same backup/delete_all_but procedure in Xcode Keychain app for "my certificates" (not 100% sure this is necessary, but doesn't hurt)
  4. export the remaining developer account(s) from Xcode Accounts manager and share it with your team
  5. import your backup to have everything on your machine again (and delete duplicates if necessary). You might have to log in to your Apple ID again from the Xcode Accounts manager

I'd recommend not using Xcode's export option, but instead to go into your Keychain Access.app, and copy the key/cert manually.

To do so, in Keychain Access, create a new keychain (by default it will be stored in ~/Library/Keychains). Select your login keychain, and then My Certificates under Category. You should now see your certificate in the right panel. It should have a disclosure arrow on the left side, and toggling that should show you your private key. Select the certificate, and copy/paste it into your new keychain (don't drag it, or it will remove it from your login keychain).

Now you can copy that keychain to your new computer, open it in Keychain Access.app and copy the key/cert to your login keychain there.

And the reason I don't recommend using Xcode for this, is exactly what you mention, that it exports all accounts. I've had clients in the past send me 'their developer key/cert' exported in this manner, that included the key/cert for dozens of other developers in their company.

Tags:

Xcode