React Native Deployment
Priority: P2 (MAINTENANCE)
Over-The-Air (OTA) Updates
CodePush (Microsoft)
JS-Only Updates: Update JS bundle without app store review.
Staging/Production: Use separate deployments.
Install: npm install react-native-code-push
Limitations: Cannot update native code (Obj-C, Java, Swift, Kotlin).
Expo Projects: Built-in OTA updates via channels (dev, staging, prod).
Install: expo install expo-updates
Build Configurations
Expo (EAS Build)
{
"build": {
"development": { "developmentClient": true },
"preview": { "distribution": "internal" },
"production": { "autoIncrement": true }
}
}
eas build --platform ios --profile production
React Native CLI
- Android: Use
productFlavors in build.gradle (dev, staging, prod).
- iOS: Use Xcode schemes.
- Fastlane: Automate builds and uploads (
fastlane ios release).
Environment Management
- react-native-config:
.env files for API URLs, keys.
- Separate Configs:
.env.dev, .env.staging, .env.production.
Anti-Patterns
- No OTA for Native Changes: Requires store release.
- No Secrets in Code: Use
.env & CI secrets.
- No Manual Builds: Automate with CI/CD.
Reference & Examples
See references/codepush-setup.md.
Related Topics
common/git-collaboration | security
1---2name: react-native-deployment3description: OTA updates with CodePush, EAS Build, and release configurations.4metadata:5 labels: [react-native, deployment, codepush, expo, eas]6 triggers:7 files: ['app.json', 'eas.json', 'android/app/build.gradle', 'ios/**']8 keywords: [deployment, codepush, eas, release, build, fastlane]9---1011# React Native Deployment1213## **Priority: P2 (MAINTENANCE)**1415## Over-The-Air (OTA) Updates1617### CodePush (Microsoft)1819- **JS-Only Updates**: Update JS bundle without app store review.20- **Staging/Production**: Use separate deployments.21- **Install**: `npm install react-native-code-push`22- **Limitations**: Cannot update native code (Obj-C, Java, Swift, Kotlin).2324- **Expo Projects**: Built-in OTA updates via channels (dev, staging, prod).25- **Install**: `expo install expo-updates`2627## Build Configurations2829### Expo (EAS Build)3031```json32{33 "build": {34 "development": { "developmentClient": true },35 "preview": { "distribution": "internal" },36 "production": { "autoIncrement": true }37 }38}39```4041```bash42eas build --platform ios --profile production43```4445### React Native CLI4647- **Android**: Use `productFlavors` in `build.gradle` (dev, staging, prod).48- **iOS**: Use Xcode schemes.49- **Fastlane**: Automate builds and uploads (`fastlane ios release`).5051## Environment Management5253- **react-native-config**: `.env` files for API URLs, keys.54- **Separate Configs**: `.env.dev`, `.env.staging`, `.env.production`.5556## Anti-Patterns5758- **No OTA for Native Changes**: Requires store release.59- **No Secrets in Code**: Use `.env` & CI secrets.60- **No Manual Builds**: Automate with CI/CD.6162## Reference & Examples6364See [references/codepush-setup.md](references/codepush-setup.md).6566## Related Topics6768common/git-collaboration | security