Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4: Is a build archive provisioning profile specific?

I haven't really used the archive function under Xcode 3, but got used to it now in Xcode 4. So far I always used to have three or four build settings in all my projects: Debug, Distribution AdHoc and Distribution AppStore. Distr. AdHoc and AppStore were both copies of "Release" and only differed in regard to their provisioning profile selected for Codesigning (so essentially they were a thing of convenience, making sure I never sent the wrong person the wrongly signed build).

Now I noticed that Xcode asks me with which profile I would like to sign my build with whenever I export an archived build form the organizer, yet at the same time the build would also fail if the selected provisioning profile in the build settings was not valid. Are Xcode 4 archives provisioning profile independent from or are thy tied to a provisioning profile? How do you solve the "challenge" of having to build for AdHoc and AppStore without having too many build settings groups (switching the groups associated with the build schemes has become somewhat cumbersome in Xcode 4)?

Thanks!

like image 918
Robin Avatar asked Apr 03 '11 20:04

Robin


1 Answers

in Xcode 4 if you archive an application it is signed with the provision profile that you have indicated to use under its build configuration. Most likely a settings that was carried over from an Xcode 3 project.

An archived app can be resigned with a different provision profile at a later time (though the organizer or command line), so in a way, yes they are independent of provision profile.

Two suggestions for managing building for AdHoc and AppStore:

1) The first is taking advantage of Xcode 4 schemes, and creating a new schemes for AdHoc and AppStore

Under the Schemes Menu: Edit Scheme -> Duplicate Scheme, then under the Archive you can select your desired build configuration (AdHoc, AppStore, etc...), you can then name this scheme AdHoc, AppStore to match too. When you want to build for release just select the target scheme and it will sign it with the associated provision profile from the build configuration.

2) Maintain 1 scheme, remove code signing from your build configurations, and code sign apps exclusively though the organizer after archiving.

like image 93
richerd Avatar answered Oct 23 '22 18:10

richerd