#2 - Expo apk keeps on crashing after build
amanbhoria
Posted on September 12, 2024
In Production build, this is how you should initialize your environment variables. Regular .env file would not work in production
Client Development build specific:
When using Expo, the EXPO_PUBLIC_ prefix is required to make environment variables available to the app's code. This makes them accessible, but it also means that all prefixed variables are publicly exposed in the JS bundle, so it's crucial to avoid using this method for secrets in production builds.
Production build specific:
Use expoConfig?.extra variables from app.json file
Use Expo's Constants.expoCongif.extra to access your variables
Keep building!
💖 💪 🙅 🚩
amanbhoria
Posted on September 12, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.