Afriex Insights

Quick Beginner’s Guide to Manually Deploy React Native Apps

Overview

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.

Android Deployment

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.

iOS Deployment

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)

Overview

Over-the-air update or OTA makes it possible for code updates, and bug fixes to be deployed to React Native apps without needing a new redeployment to the app stores. JavaScript code logic, Javascript-only libraries, and assets can typically be deployed via OTA with the exception of native codes in android or iOS folders or any library that requires native linking or configurations on the native folders.

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!

If you’re only modifying your JavaScript or image assets, it means that information can be bundled up and shipped out over the air because all of the underlying native bindings are the same as they were before, your interaction with them is the only thing that has changed.

Setup

  1. Create account https://appcenter.ms
  2. Request for Example app access
  3. 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

https://docs.microsoft.com/en-us/appcenter/distribution/codepush/

Text Link

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

SHARE THIS POST ON

Related Articles

No items found.

Choose how your money