Imagine building a shiny new experimental app on React Native and wanting to get it in the hands of your beta testers or excellent audience in your newsletter, manually bundling and deploying to App stores without setting up fancy deployment pipelines might save you a ton of headaches.
This deployment involves manual bundling of both android & iOS versions on Android Studio and Xcode.
Deploying of android bundle requires the following steps on Android Studio:
1. Locate and open android > app > bundle.gradle and update the versionName and versionCode on your code editor.
2. Open Android Studio and change Active Bundle Variants from debug to release on each of the libraries/packages listed within the bundle variants tab
3. After each library/package bundle is on release without errors, go to Build > Build Bundles/APKS > Build Bundle
4. After the release bundle is finished without errors, locate the bundle file in android > app > build > outputs > bundle > release > app-release.abb
5. Contact admin to upload the bundle to google play console.
Deploying of iOS bundle requires archiving the bundle on Xcode with these steps:
1. Open Xcode and go to info.plist
a. increase the bundle version (e.g 21 → 22) and bundle version string (short) (e.g 11.21 → 11.22)
2. Change the active device to Any iOS Device (arm64, armv7)
3. Go to product > scheme > edit scheme and change the option from debug to release
4. After closing the edit scheme dialog, select product > archive this would run a production bundle of the app.
5. After the bundle is complete, the archives window becomes active, select the archive version and click distribute , a dialogue screen below pops up. Walkthrough next and select the checkbox with (App Store Connect) → (Upload)
6. After the upload progress is complete, notify admins to distribute the app on the Apple Developer store to TestFlight.
Over The Air Update (OTA)
Let’s say you’ve got all of your app logic in an src directory and your latest round of updates has only made changes inside that directory. That means you most likely can ship that update out over the air!
- Create account https://appcenter.ms
- Request for Example app access
- Install codepush CLI
Over The Air Update Deploy (Android)
appcenter codepush release-react -a Example-Org/example-android -d Production
Over The Air Update Deploy (iOS)
appcenter codepush release-react -a Example-Org/example-ios -d Production
Note: Commit before running the deploy commands.
Further Reading: https://medium.com/@vinod8812/integrate-codepush-with-react-native-for-over-the-air-app-update-bb200683a173