Skip to the page

RN build & release · Scenario

Environments: Android flavors and iOS schemes

The interviewer asks

Say your app runs dev, staging and prod with Android product flavors. How are the iOS equivalents set up, how does JS know which environment it's in, and how do you stop a staging build hitting prod?

Then

Follow-ups the interviewer asks next

  1. "Different bundle IDs, icons and Firebase configs per environment: how?"
  2. "Is react-native-config safe for secrets?"
  3. "How does OTA interact with environments?"
  4. "How does CI select the flavor?"

The answer

What a strong answer covers

  • Android: productFlavors (applicationIdSuffix, resValues, a google-services.json per flavor src/<flavor>).
  • iOS: build configurations plus schemes with xcconfig files, a GoogleService-Info per configuration via a build phase, and per-configuration bundle IDs.
  • JS reads env values injected at build time (not secret).
  • OTA uses a channel per environment so a staging update can never reach prod.
  • CI passes --variant or -scheme per workflow.

The red pen

Common traps

Avoid:a single Firebase project for all environments. Runtime switches for environment in prod builds.

Practise this out loud

Say your answer out loud to an AI interviewer that follows up, and get a score for it.

Practise by voice

Practise questions like this out loud

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview