<< Xcode 3.2.6 and OSX Lion (10.7) - Make it install | Home | Unity 3D (Pro): View matrix (separately) for CG shaders >>

Moving iPhone Developer Credentials from one Mac to another

Update: So apparently in Xcode 4 (at least) there is an official way to do this... outlined here

I recently reinstalled OSX on my Mac and upgraded to Lion. Of course I forgot to transfer my iPhone developer credentials before I did it. I had to go back to the provisioning portal and setup my new certificate and get a new developer profile. While it wasn't a huge time waste I should have transferred my certificates and profile to save myself some time.

This is what I should have done.

  • Open Xcode
  • Window -> Organiser
  • DEVELOPMENT -> Provisioning Profiles
  • Choose your Provisioning profile, right click and "Reveal in Finder"
  • Save the resulting file
  • Open Keychain Access
  • Export your private and public certificates to files and save them
  • Transfer all the file to your new system
  • Drag and drop Provisioning Profile into Xcode's Organiser on your new system
  • Import the certificates file you exported into Keychain Access on your new system

NOTE: There is a very annoying bug in Keychain Access that means you need to re-import your certificates at the command line. Attempting to you import you certificates using the Keychain Access GUI yields "An error has occurred. Unable to import an item. The contents of this item cannot be retrieved". This is just a blatant bug in Keychain Access you can import the files into Keychain Access at the command line with the following commands.

security import priv_key.p12 -k ~/Library/Keychains/login.keychain
security import pub_key.pem -k ~/Library/Keychains/login.keychain