altf

Preparing Devices for iPhone Development

Posted in Apple by AltF on February 20, 2010

In order to test your application on a device, you must configure your computer and your device for iPhone OS development. The following steps will show you how to get started. You can also follow these steps if you have already started and getting the code sign errors like:

  • Code Sign error: The identity ‘iPhone Developer’ doesn’t match any valid certificate/private key pair in the default keychain
  • Code Sign error: Provisioning profile ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’ can’t be found

Step 1 Generate a Certificate Signing Request (CSR) with a public key

  • In your Applications folder, open the Utilities folder and launch Keychain Access.
  • Choose Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.
  • In the Certificate Information window, enter or select the following information:
  • In the User Email Address field, enter your email address
  • In the Common Name field, enter your name
  • In the Request is group, select the Saved to disk option
  • Click Continue.

The Certificate Assistant saves a Certificate Signing Request (CSR) file to your Desktop.

The public/private key pair will be generated when you create the Certificate Signing Request (CSR) if you use the Key Chain Assistant to create the CSR.

Step 2 Submit the CSR through the Program Portal.

  • Click the Development tab
  • Upload the certificate by choosing the (CSR) file
  • Click Submit

Refresh the page. Click on Approve (Or get your Admin to approve if you are not the team leader).

Note: If you are getting an error like – “The Certificate selected file is invalid. Please check the file and try again.” Try using Safari browser, Certificate upload has some known issues with Chrome browser.

Step 3 Adding Your Development Certificate to Your Keychain

Your development certificate must be in your keychain so that Xcode can digitally sign your iPhone applications. To add your development certificate to your keychain, in your computer:

  • Once you approve the development certificate in step 2. You will see a download button in “action” tab. Download and save the development certificate (developer_identity.cer) on your computer.
  • Open your development certificate with the Keychain Access application by double-clicking it or dragging it to the Keychain Access application icon.
  • In the Add Certificates dialog, ensure Keychain is set to “login” and click OK.

Similarly install WWDR intermediate certificate if you haven’t already. You will see the link to download WWDR certificate (AppleWWDRCA.cer) just below the development certificate (The text reads as *If you do not have the WWDR intermediate certificate installed, click here to download now.)

To verify the successful install, you should see the following certificates in keychain:

  • Apple Worldwide Developer
  • iPhone Developer: <Developers name>
  • Public and private keys for developer

Step 4 Register Device, Add App IDs and Create Development Provisioning Profile

More details and detailed how-to steps can be found in Device, App ID and Provisioning Tabs in the Program Portal. Just need to make sure that the App ID is same as the name of the app and while creating the provisioning file correct development certificate and devices are added.

Step 5 Installing the Development Provisioning Profile

  • Download the profile developer_profile.mobileprovision
  • Open Xcode and then open Organizer from Window->Organizer
  • Drag the downloaded file into the ‘Organizer’ window within Xcode under iPhone Development. This will automatically copy the .mobileprovision file to the proper directory.

Step 6 Build & Install App on device

  • Launch Xcode and open your project. Select ‘Device – iPhone OS’ from the ‘Device | Debug’ drop down menu.
  • Select your project in Targets under the left navigation column and select the ‘Info’ icon from the top menu bar. Select the ‘Build’ Tab. Click the ‘Any iPhone OS Device’ pop-up menu below the ‘Code Signing Identity’ field and select the iPhone Development Certificate/Provisioning Profile pair you wish to sign and install your code with.
  • Your iPhone Development certificate will be in bold with the Provisioning Profile associated with it in grey above.
  • Build and Go

4 Responses

Subscribe to comments with RSS.

  1. Purplelilgirl said, on July 5, 2010 at 6:35 am

    Yeah for great tutorials… That is a lot of steps! iPhone Development sure is complicated >.<

  2. Theresa said, on August 16, 2010 at 11:58 pm

    i follow this tutorial i found few of tips about to develop Iphone App. thanks for sharing this info.

  3. AdhiSesha said, on August 25, 2010 at 1:16 pm

    Nice useful article keep post like this ..

  4. iphone app development in india Blog said, on January 30, 2012 at 9:46 am

    Your article is very interesting about the iphone application development. i like it better and it is very useful for me. Thanks for share it.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: