Managing multiple schemes, environments and teams

Hello,


We have quite a complex setup with a lot of different environments, quite a few schemes, and two different teams for the same app. The different environments are basically different backends (and therefore different URLs to use).


We have struggled quite a bit with getting a smooth setup which is easy to manage. Right now, we have:


Targets:

- The app itself

- Watch

- Widget


Teams:

- App Store team (used to publish the app to app store)

- Enterprise team (used to ease testing. This is a large corporation with new testing devices being added constantly)


Schemes:

- Development (App Store team)

- Test 1 (Enterprise team)

- Test 2 (Enterprise team)

- Staging (Enterprise team)

- Production (App Store team)


There are a number of issues with this setup:

1. When switching scheme, we would like to automatically change the team for all targets. We have tried to do this with pre-build scripts, but it does not really seem to work.

2. As we only have one target, we only have one bundle ID. Ideally, we would like to have several environments accessible on one phone. I guess this would require using different bundle IDs per environment? Is that possible at all?

3. Are there other ways of switching bundle ID and team when switching schemes? Are we even using schemes correctly?



Is there anything we can use from the new XCode 8 features revolving around code signing that can help us?

Managing multiple schemes, environments and teams
 
 
Q