Copying keys and certificates to another one Mac for iPhone development

38,887

Solution 1

You should be able to export all your provisioning profiles with all the keys (Public and Private) with just one export

In the Organiser under the Devices tab, you need to select Developer Identity and export that to a file and give it a password. Move that file to the new system and import it into Xcode and your full identity will be set up

enter image description here

Solution 2

Import/Export works differently in Xcode 5+. This Apple Developer guide shows you how to do it.

Your account is shown under XcodePreferencesAccounts, and can be exported by clicking the gear icon () in the lower-left.

Import/Export Apple ID and Code Signing Assets

Solution 3

Import by selecting the private key from the keys tab. This prompts a password and after the password it saves in .p12 format and you can install in all the systems.

Share:
38,887
Crashalot
Author by

Crashalot

Hello. My friends call me SegFault. Describe myself in 10 seconds? You know those feisty, whip-smart, sometimes funny, and occasionally charming developers who dominate StackOverflow and consider Swift/Ruby/jQuery their native tongue? Yah, I buy coffee for them.

Updated on June 02, 2020

Comments

  • Crashalot
    Crashalot about 4 years

    We bought a new Mac and would like to migrate the certificates and private keys from the old machine to the new machine. The old machine contains keys and certificates for six iPhone apps.

    We followed the instructions outlined in this SO post, which is also echoed in other SO posts on the topic.

    Everything seems to work in that we can upload a new binary to the App Store.

    But when we look in Keychain Access, only the key/certificate pairing for one app appears.

    Do we need to worry about this? Or is there a convenient way to export/import private keys and certificates in mass (as opposed to one by one)?

    We're on Xcode 4.2.

    Thanks!

  • Crashalot
    Crashalot about 12 years
    Thanks! We did this, but didn't get a password prompt. Does this mean the private keys aren't getting saved?
  • Suhail Patel
    Suhail Patel about 12 years
    Maybe the password prompt hadn't been implemented yet. I just tried under Xcode 4.3.2 (latest Xcode) and there isn't a password prompt there either but I wouldn't worry about it. If your application is signing properly and without any provisioning issues then it's all been transferred successfully.
  • Crashalot
    Crashalot about 12 years
    How about the private keys, though? They still don't appear in Keychain Access. For instance, if we need to export the private key for Urban Airship notifications, we need access to the private key. When you import the provisioning profiles, do the keys appear in Keychain Access?
  • Suhail Patel
    Suhail Patel about 12 years
    You always need to have the Private Key for all your certificates! If memory serves correct, is there a Developer Profile/Identity an item on the left sidebar? If so, you need to export that from your old system and import it into the new system to move everything
  • Suhail Patel
    Suhail Patel about 12 years
    I have modified my original answer, it's the Developer Identity which exports everything (Provisioning, Certificates and Keys) and can then be used for import into the new system.
  • Crashalot
    Crashalot about 12 years
    Thanks, yes, we did this already, but again the private keys don't appear in Keychain Access on the new machine. Any clues?
  • Suhail Patel
    Suhail Patel about 12 years
  • zaph
    zaph almost 11 years
    What "TEAM", I do not have a "TEAM" item.
  • avs099
    avs099 over 10 years
    @SuhailPatel - that worked for me on XCode 4.6 - thanks!
  • loadedion
    loadedion about 10 years
    I noticed that this exports ALL of your accounts. For instance, if you have 3 Apple IDs, the export function will archive all three. Any way to limit that one the specified apple ID only?
  • Nicholas John Martin
    Nicholas John Martin almost 10 years
    Would laos love to know if it's possible to just export a single account? Don't think so as I haven't found a way. Typical Apple...
  • Jason
    Jason over 9 years
    I'm not aware of an easy way to do this. You could try unzipping the exported archive and manually delete the necessary identities from within it. I've not tried re-archiving it to send to someone else though.
  • CRDave
    CRDave over 9 years
    Here is easy way to export single account : developer.apple.com/library/ios/documentation/IDEs/Conceptua‌​l/… Go here and search : Exporting Selected Certificates
  • Jason
    Jason over 9 years
    Good find Dave. Won't do a whole account, but might work for some folks.