ExpoKit Multiple Environments / Apps

Does any one have any ideas or examples on how to handle multiple apps pointing to different environments (dev, staging and production) in an ExpoKit app where the Javascript bundle is self-hosted?

Following on from the answer in this thread, the question is how do you promote a javascript bundle from staging to production?

Below are a few ways we can think to tackle the problem. Solution two being the most favourable.

Solution One: Is that we can have multiple URLs to emulate the flow used in release channels. However we’d have to re-run expo export —public-url http://OUR_PROD_URL when we want to promote a build from staging to production. To us this doesn’t sound ideal as it introduces margin for error.

Solution Two: We still use multiple URLS however we use a script to read in the ios-index.json and spit out a new version with updated URLs. Meaning the build in beta is just a straight swap to production.

In my apps I do a check for underscore underscore DEV underscore underscore === true which is a react-native thing to check if it’s running locally. I then set my variables here. I realise that only gives you 1 flag and not many. The other alternative is to use environment variables just like in Node.
Check this out