GENERATING A CERTIFICATE

The first step toward testing your application on a real device is to obtain a digital certificate from Apple so that Xcode can use it to code-sign your application. Any applications that are run on your devices must be code-signed. For testing purposes, you need a development certificate. Once you are ready to distribute your application (such as through the App Store), you then need a distribution certificate (discussed later in this Appendix).

To request a development certificate from Apple, you must generate a certificate signing request (CSR). You can do this using the Keychain Access application located in the Applications/Utilities/ folder on your Mac.

In the Keychain Access application, choose Keychain Access image Certificate Assistant, and select Request a Certificate From a Certificate Authority (see Figure A-6).

image

FIGURE A-6

In the Certificate Assistant dialog (see Figure A-7), enter your email address and name, check the Saved to disk option, and click Continue.

You will be asked to save the request to a file. Use the default name suggested and click Save (see Figure A-8).

image

FIGURE A-7

FIGURE A-8

On the iOS Provisioning Portal page, click the Certificates ...

Get Beginning iOS 5 Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.