Mobile Development

Provisioning

Apple requires an app to be provisioned before allowing the app to be released on the iTunes App Store. They enforce this by linking your computer to your developer profile. They then use that link to digitally sign your app. This proves to Apple that you are a human, that you have a developer profile and that you are the author of your app.

To provision your app, take the following three steps

Each of the steps will be explained in detail below, but to summarize, the three steps are:

Step 1 - Create a production certificate
Step 2 - Register your app ID
Step 3 - Create your distribution provisioning profile

The Apple Developer Interface

To accomplish the above tasks, we will be using the Apple Developer portal as found here:

http://developer.apple.com

Below, we have the certificates interface outlined and labeled with numbers. Those numbers correspond to the definitions below:

1. Certificates - A list of certificates directly created by you, your team, or automatically created via Xcode.
2. Identifiers - A list of App IDs. Each released app has its own App ID.
3. Devices - A list of devices that are added to your developer account. Each device is allowed to install a debug or AdHoc build of your app.
4. Provisioning Profiles - A list of active and expired provisioning profiles for your developer account.
5. Control bar - titles the active selection and provides a "+" button for creating more.
6. Detail list pane - A detail list of the content corresponding to the currently selected section.


Step 1: Creating a production certificate

  1. Select "Certificates" -> "+" Button (as pictured above).
  2. Under Production, select "App Store and Ad Hoc".
  3. Apple will walk you through creating a CSR, using the application Keychain Access on your Mac.

    Within the Keychain Access drop down menu, select Keychain Access > Certificate Assistant > 
    Request a Certificate from a Certificate Authority.
    
    In the Certificate Information window, enter the following information:
    1.  In the User Email Address field, enter your email address.
    2.  In the Common Name field, create a name for your private key (e.g., John Doe Dev Key).
    3.  The CA Email Address field should be left empty.
    4.  In the "Request is" group, select the "Saved to disk" option.
    5.  Click Continue within Keychain Access to complete the CSR generating process.
    
  4. Upload your CSR file to Apple.
  5. Apple will create a Production certificate for you. You can now download and install this certificate by double clicking it in the Finder.

Step 2: Creating a new App ID

From within Identifiers, you can select App IDs. Then hit the "+" sign to create a new app ID

The main sections of creating an App ID are:

App ID Description

This is a user-facing string used to reference this particular App ID. Examples include your app name, e.g. "Awesome App":

App ID Suffix

This is also known as your bundle ID. The bundle ID will be how you reference your app in iTunes Connect as well as within the rest of this Apple Developer Portal. We typically use a reverse domain style, e.g. com.generalassembly.awesome-app

App Services

These represent a list of services that are available to your app. They must be chosen before the app is built and released. Think through each option and decide if you'd like to utilize these services.


Step 3: Creating a Distribution Provisioning Profile

To create a provisioning profile for use on the iTunes App Store, select Provisioning Profiles -> Distribution -> "+" button.

Apple will walk you through creating the profile. You will be selecting your Distribution Certificate from step 1 (above) and your bundle ID from step 2 (above) in order to complete this process.


Phew

We made it! Now onto our next step, iTunes Connect.

References

Apple Developer Portal - http://developer.apple.com

Demystifying iOS certificates and provisioning files - http://escoz.com/blog/demystifying-ios-certificates-and-provisioning-files/