Step 3 Install and Backup Your Distribution Certificate

Double-click the downloaded distribution_identity.cer file, which will launch the Keychain Access application (if it's not already open). Keychain Access will display a dialog window, asking if you'd like to add the certificate to a keychain. Make sure the dialog's keychain menu is set to login, and then click the Add button. In the Keys category of the main Keychain Access window, verify that your private and public keys are now paired together with your Distribution Certificate to ensure it is properly configured on your Mac. In this example, my "Electric Butterfly, Inc." key (which was created when I generated a certificate-signing request under the same name) is now paired with my imported iPhone distribution certificate (see Figure 7-31).

Figure 7-31. Verily that your imported iPhone distribution certificate has been paired with the correct private key in Keychain Access.

Do not install distribution certificates for multiple iPhone Developer Program accounts into the same Keychain. Doing so will cause problems in Xcode. If you're compiling and submitting iPhone apps for clients, then create a separate Mac OS X user account for each distribution certificate you need to install. You can do all your development within your primary Mac user account, but to compile for distribution, you should switch to the user account that has that client's distribution certificate installed.

IMPORTANT NOTE: Export your iPhone distribution private key for safekeeping. This step may very well be the most important one in this entire process, so please do not skip ahead. This private key is required by Xcode to sign compiled app binaries. Without the proper code signing, the application cannot be uploaded to the App Store, nor will it work with ad hoc testing. This private key cannot be reproduced, so it is imperative that you export it and save the file in a special place, just in case you need to restore it at a later date when switching to a new Mac or reinstalling the operating system.

To export your Distribution private key, select it from the Keys section of Keychain Access. In the Figure 7-31 example, my Distribution private key is selected. Then from the File menu, choose Export Items. Save the file in Personal Information Exchange (.p12) format, which requires you to assign a password.

If you ever need to reinstall this private key, simply double-click the exported .p12 file and enter your password. Keychain Access will take care of the rest.

Continue reading here: App Store Identity Badge

Was this article helpful?

0 0