One Xcode 4 project, four targeted "variations" ... using Twist

I have a suspicious suspicion that what I want to do can be done more elegantly in Xcode 4 ... but then I was wrong. Here's the scoop:

I have an iOS application with regular debug / release builds and regular, unit tests and ui-test objects. Nothing unusual. The application also accesses the server. Nothing special. Besides...

Now I want to create an application for four different server environments: development, QA, UAT / Beta and Production. In addition, each assembly must be able to coexist on one device, for a developer assembly or for special distribution.

So let's see ... how can this happen? Each application will need its own identifier for starters. Perhaps finding the type of assembly can help you decide which server to use:

Debugging creates targeted development. (Ad Hoc Distribution) releases targeted QA (... or UAT / Beta?). (App Store distribution) Release creates targeted production.

Regarding these Goal Identifiers (com.companyname.appname), I suppose I could use different Info.plist files for each assembly ... but it smells cumbersome (duplicate information). Perhaps this is the only way?

Bottom line: I'm not sure how) to resolve Ad Hoc vs. distribution cases The App Store, as well as b) QA / UAT cases, as well as c) how to do it without messing up (at least for me) the more elegant setup of Xcode 4 offers such simple functions as the โ€œPress Debug / Releaseโ€ button.

Maybe I need to add new circuits? Perhaps it's just a matter of adding Info.plist files ... or assemblies ... or configurations ... or goals ... or some kind of mixture. Again, I try not to duplicate a lot of information (only to change one or two settings) if I can help. Debugging / release seems to be very clean as it is, and I want to make sure that I change things along the proper axis. Measure twice, cut once, as they say.

Keys are welcome / appreciated!

+4
source share
1 answer

Here is what I ended up doing. Hope this is the most reasonable way to do this:

  • I am currently combining QA and UAT. (This may be shared later.)
  • I created three Info plists, one for Development (Debug), Beta / QA / UAT (Release) and Production (Release). Each of them has slightly different displayed package names, package identifiers, and package names, but otherwise they are identical. (THIS is where the lion's share of duplicated information will be. You need to change things in all three - for example, if I add a new font or type of URL.)
  • I created a new configuration, a beta version (based on the original Release / Production configuration), so now there are Dev, Beta, and Production settings.
  • In the Provisioning Portal, I set the application identifiers using the previously announced package identifiers and created new certificates for beta versions, Dev and Production. (The existing application identifier is used for releases of the App Store.)
  • In the build settings, I used conditional settings to specify the corresponding information plates and code signature identifiers.

I think it will be a trick! However, if there is a cleaner way, please consider. Thanks!

0
source

Source: https://habr.com/ru/post/1344791/


All Articles