Now that you have a provisioning profile you need to install it onto a device. This will allow any apps that are associated with the provisioning profile to be tested on that device.
In this recipe, we will use iTunes to copy a provisioning profile to a connected device.
If you haven't already created a provisioning profile then refer to the Creating a development provisioning profile recipe before proceeding.
Launch iTunes and connect your iOS device through USB.
After a brief moment, the device will appear within the DEVICES section in iTunes.
Select File | Add File to Library (Ctrl + O | Cmd + O) from iTunes' drop-down menu.
Navigate to your
Documents
folder and select your provisioning profile at:packt\flash-ios-cookbook\developer-files\Flash_iOS_Cookbook.mobileprovision
. The provisioning profile will be added to iTunes.In the DEVICES section in iTunes, click on your device's name. You will be shown the device's summary information.
Click on the Sync button at the bottom-right corner of iTunes to copy the provisioning profile to your device.
A provisioning profile will only install on a device that is tied to that profile.
On your iOS device, you can confirm that the provisioning profile has been added by selecting Settings | General | Profiles. You should be able to see the profile listed along with its expiry date. If no provisioning profiles are installed on your device, then the Profiles option will not be made available.
When installing apps for testing, the app will be checked against the device's list of provisioning profiles first. It will only be copied onto the device if a provisioning profile associated with that app is found.
Once you are comfortable adding provisioning profiles to your devices, you may want to consider the following information.
You can remove provisioning profiles from your device through Settings | General | Profiles. Typically, you will want to do this when the profile expires. However, after removing a profile you may find that it re-appears on your device the next time it is synchronized with iTunes on your computer.
A copy of every provisioning profile you install is kept on your computer as well as your device. If you remove a profile from your device, then make sure you also remove the local copy from your computer.
Here is where provisioning profiles are stored:
Windows 7 and Vista:
C:\Users\<username>\AppData\Roaming\Apple Computer\MobileDevice\Provisioning Profiles\
Widows XP:
C:\Documents and Settings\<username>\AppData\Roaming\Apple Computer\MobileDevice\Provisioning Profiles\
Mac OS X:
<username>/Library/MobileDevice/Provisioning Profiles/
Simply delete the profiles using either Windows Explorer or Finder depending on your operating system.
As an alternative to iTunes, you may want to download and install the iPhone Configuration Utility from Apple.
It allows you to easily manage provisioning profiles and capture console log information from a connected device. You can check to see when a provisioning profile is about to expire and also discover which App ID is associated with each installed app.
The iPhone Configuration Utility is available for both Mac OS X and Windows and can be downloaded from www.apple.com/support/iphone/enterprise.