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 Certificate Assistant, and select Request a Certificate From a Certificate Authority (see 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).
On the iOS Provisioning Portal page, click the Certificates ...