5

I have an application that will be distributed internally to 100's of employees but also distributed externally to the App Store.

I've already signed up for the regular iOS developer membership as well as the Enterprise developer program.

However, I'm trying to figure out how to have xcode switch between building a debug build, and internal build and an app store build.

Specifically, provisioning profiles apply to a specific App ID. I had to create two different app ids in the developer portal but my application only has 1 app id (obviously).

Any ideas how to have one project that could selectively build different configs...?
Vishal
  • 8,246
  • 6
  • 37
  • 52
aloo
  • 5,331
  • 7
  • 55
  • 94

4 Answers4

6

You'll have to use different targets. This gives you different configurations, and you can also set different app ids/bundle identifiers.

mrueg
  • 8,185
  • 4
  • 44
  • 66
  • Can you make different targets use the same code base? Every tine I created a new target it created a new source folder for me. – aloo Mar 25 '13 at 00:39
  • 1
    You absolutely can. Easiest thing is probably to duplicate your existing target, and then tweak that (like, point it at a different Info.plist file, etc.). – Sixten Otto Mar 25 '13 at 00:57
  • Do I have to create a different App Id for In House builds and App Store builds? – aloo Mar 25 '13 at 04:47
  • AFAIK, yes. And you'd need to have them owned by different Developer Program subscriptions, as well. (Enterprise memberships can't submit App Store apps: https://developer.apple.com/programs/start/ios/) – Sixten Otto Mar 25 '13 at 17:22
  • i know that this is an old question, but it answered my question today.. this should be the acceptable answer! – Dany Balian Sep 12 '17 at 12:37
0

I agree with the Answer by @mrueg, but, if for whatever reason, you need to keep the same App-Id, you can release one signed with the normal distruibution certificate for release on the app store, then go back to Xcode, create a new archive but signed with the enterprise distrubution certificate.

You might want to also consider the B2B Program, where I don't think you would need to mess around with mutiple certificates.

Mike D
  • 4,938
  • 6
  • 43
  • 99
  • How, exactly? Enterprise Program memberships can't do App Store distribution (and vice versa), and two Developer Programs can't both own the same bundle identifier. Where would these two distribution certificates come from? – Sixten Otto Mar 25 '13 at 13:24
-2

You just need one App ID.

  1. For Internal distribution, you need to set up all devices in apple developers. http://developer.apple.com/library/ios/#recipes/ProvisioningPortal_Recipes/CreatingaDistributionProvisioningProfile/CreatingaDistributionProvisioningProfile.html

  2. For External distribution, you just need to download the app by applestore.

Marckaraujo
  • 7,422
  • 11
  • 59
  • 97
  • About #2, that is for `Ad-Hoc` distribution, which was intended for beta testing. For Enterprise distrubution of the final product, there is no limit (or at least it much higher than 100). – Mike D Mar 25 '13 at 00:18
-2

Just archive the project, open Xcode organizer, select the archive, then select to distribute the archive, choose the option you wanted. ad-hoc, enterprise, app store, these options all there. remember to code resigning properly.

Wubao Li
  • 1,728
  • 10
  • 13