Search code examples
iosxcodeprovisioning-profilehockeyapp

Confused with provisioning profiles


I am having a difficult time to create and understand provisioning profiles. Here is what I would like to achieve:

  1. I have 10 devices in my developer portal.
  2. I want to set 5 of these devices with a profile for development and testing only. I created a new provisioning profile for that. For the sake of this question, let's call this profile: MyProfile
  3. Now XCode has created a dev profile as well, with all 10 devices, that I can not modify and is managed by XCode. For the sake of this question, lets call this XCodeProfile.

Now when I set the provisioning profile in XCode for release to MyProfile, then I can see that the code signing automatically changes to "iPhone Developer". When I set it to automatic, then it changes to "iOS Developer".

Scenario 1:

When I now archive this everything looks good - I see 5 devices (using hockeyapp). When I press the "Run" button, I am not able to run this. I get the famous "failed to get the task for process" error.

Scenario 2:

I set the provisioning profile in XCode to automatic and I can run the app without any issues from XCode directly on my device. But when I archive then I see all 10 devices instead of 5.

How can I get the best of both worlds?

Archive and see only 5 devices and be able to run the app on my device when pressing the "run" button in XCode.


Solution

  • Archiving and running are different actions (in the scheme). If you really want to, you can create another configuration (by duplicating the existing release configuration), and give archiving and running different configurations. Different configurations can have different build settings, so you can automatically use one profile when archiving and another profile when building, if that's really what you want to do.