Follow these steps to prepare your Git repository to host bundle files:
1. Create and Clone a Repository
Create a new repository (e.g., OTA-bundle) on GitHub, GitLab, or Bitbucket, then clone it locally:
git clone https://github\/<your-username>/OTA-bundle.git
2. Generate and Add Bundle Files
You must export your React Native or Expo bundles and add them to the repository.
For React Native CLI:
"scripts": {
"export-android": "mkdir -p android/output && react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/output/index.android.bundle --assets-dest android/output",
"export-ios": "mkdir -p ios/output && react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios/output/main.jsbundle --assets-dest ios/output"
}
For Expo / Expo Bare:
"scripts": {
"export-android": "mkdir -p android/output && npx expo export:embed --platform android --entry-file node_modules/expo/AppEntry.js --bundle-output android/output/index.android.bundle --dev false --assets-dest android/output",
"export-ios": "mkdir -p ios/output && npx expo export:embed --platform ios --entry-file node_modules/expo/AppEntry.js --bundle-output ios/output/main.jsbundle --dev false --assets-dest ios/output"
}
*Note: For Expo, verify the --entry-file path matches your package.json main entry.
After generating, copy the android/output or ios/output folders into your cloned repository, then commit and push:
git add .
git commit -m "Initial commit with bundle files"
git push origin main
3. Organize Branches (Recommended)
Create platform-specific branches to manage updates separately:
git checkout -b iOS
git push origin iOS
git checkout -b android
git push origin android