iOS Code Signing Identity
ios, ipad, iphone, provisioning-profile, xcode
Solution
1. On which line should I specify the provisioning profile?
Firstly, you are not obliged to set provisioning profiles in the `PROJECT` section. I always set them in the `TARGET` section. Now if your are developing, you should set the:
Any iOS SDK iPhone Developer
Under `Debug`. And if you are preparing Adhoc, you need to set:
Any iOS SDK iPhone Distribution
Under `Release`.
2 .What is the best way to import an updated provisioning profile into Xcode?
Go to `Organizer`, click `Devices` tab, then hit the `New` button at the bottom, you will be prompted to sign in your Apple account. Then I think profiles will be imported, click `Refresh` button to see added profiles.
Problem
My Xcode 4.6 iOS project has "PROJECT" and "TARGETS" sections, each of which has a "Debug" and "Release" area under "Code Signing Identity" with an "Any iOS SDK" entry. - Currently, I specify my Developer or Distribution provisioning profile in all four of the slots under PROJECT and TARGET. I believe that each provisioning profile really only needs to be placed in one position. - Whenever I update a provisioning profile because it is expiring, I am adding additional development devices, or I am adding additional AdHoc test devices, it is always painful. Xcode never allows me to simply choose "iPhone Developer". I always have to navigate to the correct provisioning profile by name. Furthermore, I have to delete the old provisioning profiles before I import the new ones, otherwise the old ones will continue to get used. It all looks something like this: ``` PROJECT myProject Code Signing Code Signing Identity Debug iPhone Developer Any iOS SDK iPhone Developer Release iPhone Distribution Any iOS SDK iPhone Distribution TARGET myTarget Code Signing Debug iPhone Developer Any iOS SDK iPhone Developer Release iPhone Distribution Any iOS SDK iPhone Distribution ``` So, here are my summarized questions: - On which line should I specify the provisioning profile? - What is the best way to import an updated provisioning profile into Xcode?