Copying keys and certificates to another one Mac for iPhone development
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
Solution 2
Import/Export works differently in Xcode 5+. This Apple Developer guide shows you how to do it.
Your account is shown under Xcode → Preferences → Accounts, and can be exported by clicking the gear icon () in the lower-left.
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.
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, 2020Comments
-
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 about 12 yearsThanks! We did this, but didn't get a password prompt. Does this mean the private keys aren't getting saved?
-
Suhail Patel about 12 yearsMaybe 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 about 12 yearsHow 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 about 12 yearsYou 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 about 12 yearsI 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 about 12 yearsThanks, yes, we did this already, but again the private keys don't appear in Keychain Access on the new machine. Any clues?
-
Suhail Patel about 12 years
-
zaph almost 11 yearsWhat "TEAM", I do not have a "TEAM" item.
-
avs099 over 10 years@SuhailPatel - that worked for me on XCode 4.6 - thanks!
-
loadedion about 10 yearsI 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 almost 10 yearsWould 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 over 9 yearsI'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 over 9 yearsHere is easy way to export single account : developer.apple.com/library/ios/documentation/IDEs/Conceptual/… Go here and search : Exporting Selected Certificates
-
Jason over 9 yearsGood find Dave. Won't do a whole account, but might work for some folks.