When I am developing my React Native expo iOS app on my dev machine, I want the API_URL
variable to be http://localhost:3000
. On the other hand, it should be https://api.website.com
when the app is built.
Or something similar where the app can detect the environment it is running in, whether its in dev mode or a published version downloaded from the app store, and use the correct API_URL
value.
How can we let this happen automatically? Looked into expo-constants