Core Principles
- •Configuration as Code: All native configuration goes into
app.jsonor Config Plugins. - •Prebuild First: Do not rely on committing
android/orios/folders. - •Expo APIs: Prefer
expo-*packages over unmaintained bare react-native libraries.
CRITICAL RULES
1. app.json / app.config.ts
- •ALWAYS use
app.jsonfor static config andapp.config.tsif you need dynamic environment variables. - •NEVER manually edit
Info.plistorAndroidManifest.xmlnatively. Usecnal,mods, or config plugins.
2. Native Dependencies
- •ALWAYS install libraries using
npx expo installto ensure version compatibility. - •CHECK if a library requires a config plugin before installing.
3. Environment Variables
- •ALWAYS use
expo-constantsfor public keys. - •NEVER commit secret keys to the repo.
4. Updates & OTA
- •UNDERSTAND that modifying native code (adding a new library with native code) requires a new Development Build, simply refreshing the bundler won't work.