Installing iOS Developer Certificates and Provisioning Profiles

There are two types of certificates required to build your applications, both for debugging on a device and for iTunes store distribution. The first is your Development Certificate. This certificate is installed on your Mac within the KeyChain and is used for every single application you will develop. It identifies you, the developer, when you are distributing an app.

The second type is the application's Provisioning Profile. This profile certificate is both application specific and release specific. This means you'll need to create a separate profile for each state of the application you wish to release (most commonly being Development and Distribution).

In this recipe, we will go through the process of creating and installing your Developer Certificate, and then creating and using an application-specific Provisioning Profile in Titanium Studio.

How to do it...

We will now start off with the steps required for installing iOS Developer Certificates and Provisioning Profiles.

  1. Set up your iOS Developer Certificate.
  2. Log in to your Apple Developer account if you have not done so already, at http://developer.apple.com/ios, and click on the iOS Provisioning Portal link. The page that loads will have a number of options on the left-hand menu, click on the Certificates option. A page will load with a series of steps entitled How to create a Development Certificate. You will need to follow these steps exactly as described, and when you have gone through them from start to finish you should have a Certificate Signing Request (CSR) file saved on your Mac. For this recipe, we'll make the assumption that you have followed these steps closely and have saved a CSR to your desktop.
  3. Click on the Choose button at the bottom of the screen to select the CSR file from your computer and upload it to the web page. Once it has finished uploading, select the Submit button in the bottom right corner of the page.

    When the screen reloads, you should now see a certificate appear in the grid, with the name you gave it when generated, and a status of Pending Issuance. If you own the iOS account, you can simply wait 20-30 seconds and refresh the page to have the status change to Issued and a Download action appear to the right of the grid. If the account you are using belongs to another party, you will need to wait for them to confirm this action before you receive an issued certificate. Download the certificate now, and double-click the resulting saved file when it has completed downloading. It will then automatically open in KeyChain Access and show you that it's been installed. If you have a message at the bottom of the page about the WWDR certificate needing to be installed, you may also choose to download and run that at this point.

  4. Setting up your device.

    If you have an iPhone or iPod touch and wish to test with it, then you first need to register that device against your iTunes account. Click on the Devices menu link on the left-hand side of the page and then Add Device. The screen that appears will ask you for information about who owns the device, and more specifically, what that device's unique identifier is. You can find this identifier by plugging in your device to your Mac and opening iTunes. It will appear under My iPhone/iPod and then clicking on the Serial Number label that appears.

    An example of the unique identifier is shown in the following screenshot:

    How to do it...
  5. Creating your Application Provisioning profile.

    Now that your Developer Certificate is set up, it's time to create the provisioning profiles for an application we have built. For this example, we're going to use the details for the LoanCalc app we built in Chapter 1. However, you could use any application you have already created.

Click on the App IDs link from the left-hand menu, and when the screen loads, select the New App ID button.

Give your app a description and leave the Bundle Seed ID drop down list set as Generate New.

Enter in the Bundle Identifier. This is the all-important identifier that you give your application upon its creation in Titanium Studio. In this example, our bundle identifier is com.packtpub.loancalc.

Press Submit to complete the process and generate your App ID.

Now click on Provisioning and select New Profile after the screen loads. It should have the Development tab activated.

Choose a name for your profile. We'll keep it simple and call this one LoanCalc Development Profile. You should now be able to check your certificate checkbox, and choose the LoanCalc app identifier from the drop down list, as well as the device you wish to use for this Development profile. Press Submit when you have completed filling in the form.

Your new profile should now appear in the list of profiles under the Development tab. Wait for 20-30 seconds and refresh the page, and its status should change from Pending to Download. Download the certificate to a location on your computer such as the Desktop.

Repeat the previous steps, but instead of choosing the Development tab options, choose the Distribution tab instead. You'll also have an additional option when creating the certificate for Distribution: App Store or Ad Hoc. If you want to distribute your app on the iTunes store, ensure you check the first radio button option.

Note

If you're not the account owner, but have been given membership status to someone else's iTunes account (e.g. if you are the employee of a larger company), then you need to ensure that you've been given admin access in order to set up your certificates and profiles.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.76.204