0

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.

Sonu Kapoor
  • 1,567
  • 3
  • 16
  • 34
  • Why are you archiving? You can't use the archive directly for anything. It must have some purpose. There is no important sense in which it matters that "when I archive then I see all 10 devices". Don't worry, be happy. — Now, if you were planning to use the archive to export for Ad Hoc testing, then you would make another profile — an Ad Hoc distribution profile. And it would be usable on whatever devices you specified in that profile. – matt May 02 '16 at 19:23
  • You got it right. I am archiving for the purpose of Ad Hoc testing. – Sonu Kapoor May 02 '16 at 19:36

1 Answers1

1

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.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • So does that mean that I need to switch the profile manually when I want to archive the app for hockeyapp and leave it set to "automatic" when I am developing and testing directly on my device? – Sonu Kapoor May 02 '16 at 19:31
  • Not at all. That's the exact opposite of what I said. – matt May 02 '16 at 19:51
  • sorry I misunderstood. I will try to create the configuration. – Sonu Kapoor May 02 '16 at 19:58