I was wondering what the best approach is to set sensitive environment variables and still use Expo Go to develop my App. Because like to use the tools in the App to debug my code.
First and the easiest approach is to add the prefix EXPO_PUBLIC_X
, but this will only safe the environment variables in plain text, so this is no option for me.
Secondly I found something called react-native-dotenv
but this completely ruins your build. To fix this you have to remove this package and also something called babel-plugin-transform-inline-environment-variables
and delete your package-lock.json
and use the command npm start --clear
And lastly I found out about Expo Secrets. But I don’t know how to integrate them in my code and if it is possible to use the secrets when building for Expo Go and not with Expos service called EAS.