The right way to assist a number of environments on iOS with React Native


I have to assist dev, staging and prod environments. My query is tips on how to appropriately use xcode schemes, targets and construct configurations to do that. I’m utilizing react-native-config and I’ve created my numerous .env recordsdata e.g

To my data there are two methods to perform this:

Create a scheme and debug and launch construct configurations for every env.
For instance for the dev env:
AppDev scheme, which makes use of DevDebug and DevRelease construct configurations. These construct configurations are created as duplicates of the default Debug and Launch configurations.
Observe there’s solely a single goal, which is the unique one which the venture comes with.

Create a schema and goal for every env. Every goal has its personal Debug and Launch construct configurations.
For instance for the dev env:
AppDev scheme and AppDev goal with Debug and Launch construct configurations.

I really feel like methodology 1 is extra appropriate. I’ve beforehand labored on a venture a number of years in the past that used this methodology utilizing React Native 0.59. Nevertheless I’m unable to get this to work on a model new app I created utilizing React Native 0.71.3. The app crashes on launch instantly. I can put up the error particulars if required but it surely simply seems like a fairly generic deadly crash. However plenty of tutorials I see on-line use methodology 2. I can even get this methodology to work. Is anybody in a position to present a suggestion as to which methodology is appropriate and preferable.