39

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!

Community
  • 1
  • 1
Crashalot
  • 33,605
  • 61
  • 269
  • 439

3 Answers3

73

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

Jason
  • 2,223
  • 2
  • 20
  • 28
  • 6
    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? – loadedion May 05 '14 at 16:41
  • 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... – Nicholas John Martin Jul 20 '14 at 03:48
  • 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. – Jason Jan 07 '15 at 15:26
  • 2
    Here is easy way to export single account : https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html Go here and search : Exporting Selected Certificates – CRDave Mar 20 '15 at 06:30
  • Good find Dave. Won't do a whole account, but might work for some folks. – Jason Mar 25 '15 at 17:29
23

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

Mick MacCallum
  • 129,200
  • 40
  • 280
  • 281
Suhail Patel
  • 13,644
  • 2
  • 44
  • 49
  • 1
    Thanks! We did this, but didn't get a password prompt. Does this mean the private keys aren't getting saved? – Crashalot May 01 '12 at 22:13
  • 1
    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. – Suhail Patel May 01 '12 at 22:16
  • 1
    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? – Crashalot May 01 '12 at 22:19
  • 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 May 01 '12 at 22:33
  • 2
    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. – Suhail Patel May 01 '12 at 22:39
  • Thanks, yes, we did this already, but again the private keys don't appear in Keychain Access on the new machine. Any clues? – Crashalot May 01 '12 at 22:46
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/10814/discussion-between-suhail-patel-and-crashalot) – Suhail Patel May 02 '12 at 20:51
  • 2
    What "TEAM", I do not have a "TEAM" item. – zaph Sep 17 '13 at 19:57
  • @SuhailPatel - that worked for me on XCode 4.6 - thanks! – avs099 Dec 15 '13 at 18:54
6

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.