RN build & release · Scenario
Environments: Android flavors and iOS schemes
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voiceThe 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
- "Different bundle IDs, icons and Firebase configs per environment: how?"
- "Is
react-native-configsafe for secrets?" - "How does OTA interact with environments?"
- "How does CI select the flavor?"
The answer
What a strong answer covers
- Android:
productFlavors(applicationIdSuffix, resValues, agoogle-services.jsonper flavorsrc/<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
--variantor-schemeper 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 voicePractise 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.