If you’re doing any iPhone development, be ready for some headaches if you get a new machine. While the migration assistant does move all of your applications and settings over from your old machine, it doesn’t necessarily copy keychain items, and if you haven’t brought across your private key for your distribution certificate you’re going to be out of luck. Don’t miss these important bits from this Program Portal page:
Saving your Private Key and Transferring to other Systems
It is critical that you save your private key somewhere safe in the event that you need to develop on multiple computers or decide to reinstall your system OS. Without your private key, you will be unable to sign binaries in Xcode and test your application on any Apple device. When a CSR is generated, the Keychain Access application creates a private key on your login keychain. This private key is tied to your user account and cannot be reproduced if lost due to an OS reinstall. If you plan to do development and testing on multiple systems, you will need to import your private key onto all of the systems you’ll be doing work on.
- To export your private key and certificate for safe-keeping and for enabling development on multiple systems, open up the Keychain Access Application and select the ‘Keys’ category.
- Control-Click on the private key associated with your iPhone Development Certificate and click ‘Export Items’ in the menu. The private key is identified by the iPhone Developer: <first Name> <last Name> public certificate that is paired with it.
- Save your key in the Personal Information Exchange (.p12) file format.
- You will be prompted to create a password which is used when you attempt to import this key on another computer.
- You can now transfer this .p12 file between systems. Double-click on the .p12 to install it on a system. You will be prompted for the password you entered in Step 4.
Happily enough I had done all of this, but there was still a great deal of revoking, requesting, and installing of certificates and provisioning profiles before I finally got App Store builds of my application working on the new machine.