Xcode ToolsMidOpen-ended

How do you configure an iOS app to support multiple environments (Dev, SIT, UAT, Prod) so all can be installed simultaneously on the same device?

Explanation & Code

Use separate Xcode Schemes, Build Configurations, Bundle Identifiers, and Firebase plists — one set per environment.

EnvironmentBundle ID SuffixFirebase PlistApp Display Name
Dev.devGoogleService-Info-Dev.plistYourApp Dev
SIT.sitGoogleService-Info-SIT.plistYourApp SIT
UAT.uatGoogleService-Info-UAT.plistYourApp UAT
Prod(none)GoogleService-Info.plistYourApp

Step-by-step:

  1. Schemes — Product → Scheme → Manage Schemes → + → name it Dev, SIT, UAT (Prod reuses the default).
  2. Build Configurations — Project (root) → Info → Configurations → + (Duplicate) → name to match environment.
  3. Link scheme to config — Edit Scheme → each action (Run/Test/Archive/etc.) → set Build Configuration to the matching one.
  4. Firebase plists — Download from each Firebase console, rename (GoogleService-Info-Dev.plist, etc.), drag all into Xcode with Target Membership checked. Do not conditionally exclude them from the bundle — all four must be present at runtime.
  5. Active Compilation Conditions — Target → Build Settings → Active Compilation Conditions → set Dev, SIT, UAT per config; leave Prod empty.
  6. Bundle Identifiers — Signing & Capabilities → switch configuration → set unique bundle ID per config.
  7. App Display Name — Add a User-Defined Build Setting APP_DISPLAY_NAME with a value per config, then set CFBundleDisplayName = $(APP_DISPLAY_NAME) in Info.plist.

Rate your understanding:

Ready to practice more Xcode Tools?

Test yourself with our interactive quiz mode or browse all curated questions for this topic.