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.
We will now start off with the steps required for installing iOS Developer Certificates and Provisioning Profiles.
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.
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:
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.
18.117.76.204