Once you have a development certificate and at least one registered iOS device and an App ID, you are ready to create a provisioning profile. A development provisioning profile is a file that ties an app (or group of apps) to one or more authorized developers and a set of devices. Before you can test an app on a device, you must first install a provisioning profile onto it. A device can have multiple provisioning profiles installed.
Provisioning profiles are created from the iOS Provisioning Portal.
This recipe will take you through the steps required to create a provisioning profile that will allow you to test this book's examples on a device.
In order to complete this recipe, you will need to create a development certificate, register an iOS device, and have an App ID. If you haven't already done this, then complete the following recipes first:
Obtaining your development certificate
Registering a device
Creating an App ID
Follow the steps to create a development provisioning profile:
Log into the iOS Dev Center at http://developer.apple.com/devcenter/ios and move to the Provisioning Portal.
Click on the Provisioning link on the left-hand side of the Portal's home page. You will be taken to the provisioning page and the Development tab will be selected.
Click on the New Profile button found at the far-right of the Development Provisioning Profiles heading. You will be taken to the Create iOS Development Provisioning Profile page.
From this page you will generate a provisioning profile by performing the following steps:
Assigning a name to the provisioning profile.
Associating a development certificate with it.
Selecting an App ID.
Selecting one or more iOS devices that can be used for testing.
First, enter Flash iOS Cookbook into the Profile Name text field. From the Certificates field, check on the checkbox next to your development certificate. From the App ID drop-down box, select the General Development App ID you created a while ago. Finally, check on the checkbox next to the device you would like to test this book's examples with. If you have registered more than one device, then you can select them all.
Click on the Submit button at the bottom-right of the page.
You will be taken back to the Development Provisioning Profiles page where your provisioning profile will be listed with a status of Pending assigned to it. Refreshing the page in your browser will change the provisioning profile's status to Active.
Now click on the Download button underneath the Actions column. Save the
Flash_iOS_Cookbook.mobileprovision
file to the same location as your P12 certificate file. For the exact path, refer to either the Creating a P12 certificate using Windows recipe or the Creating a P12 certificate using Mac OS X recipe.
Your development provisioning profile has been associated with the General Development
App ID from the Creating an App ID recipe. Being a wildcard App ID, this provisioning profile can be used to run and test any of this book's examples on an authorized device.
The provisioning profile needs to be installed on authorized devices and is also required by Flash Professional. In order to compile a native iOS app, you need to provide Flash with not only your P12 certificate file, but also the provisioning profile associated with the app you are attempting to compile.
Before we move to the final recipe, you may find the following additional information useful.
A development provisioning profile is restricted to app development and is valid for only three months. If your provisioning profile expires during development, then you will need to create a new one from the Provisioning Portal. Remember to install the new profile on any authorized devices and to rebuild your app from Flash using your new profile.
Unlike App IDs, a provisioning profile can be removed from the Provisioning Portal. From the list of provisioning profiles, simply check on the checkbox next to each one you would like to delete. And click on the Remove Selected button at the bottom of the list of profiles.
You can also edit an existing provisioning profile. On the right-hand side within the Actions column, click on the profile's Edit link. You can either modify the original details you associated with the profile or even make a duplicate copy of a profile before making changes to it.
There are in fact three types of provisioning profile that can be created. This book will focus on the use of the development provisioning profile but the provisioning process also covers two methods of distribution—Ad Hoc and App Store.
An Ad Hoc Distribution Provisioning Profile is used to share an app with up to 100 other iOS users for testing. An App Store Distribution Provisioning Profile on the other hand is used to build and submit an app to the App Store.
When creating either an Ad Hoc or App Store distribution provisioning profile, you will need to request and use a distribution certificate rather than the development certificate required by a development provisioning profile.
For more details, refer to the Distribution section of the Program User Guide, which can be found within the Provisioning Portal's Resources section.
If you are working in a team environment, you must be either the Team Agent or a Team Admin to create a provisioning profile. When creating a provisioning profile, check on the checkbox next to the certificate of each team member who is to be granted permission to build and test the app(s) associated with the provisioning profile's App ID.