Introducing Revopush SDK - Your enhanced CodePush client for modern React Native applications.

We are excited to introduce Revopush 1.0, our customised client for CodePush. This client is a fork of Microsoft's official CodePush client, enhanced to support React Native versions 0.76 and above, including the New Architecture.


By basing our client on the existing CodePush, we've ensured 100% compatibility with the current API, facilitating a seamless transition for users migrating to our platform. We believe CodePush is among the best over-the-air (OTA) clients, offering features like resource delivery beyond the bundle, rollouts and rollbacks, and advanced security configurations such as code signing.


Revopush 1.0 marks our initial step towards a modern OTA solution. Our roadmap for Revopush 2.0 includes the following features:


  • Refactoring the existing client using Turbo Modules for optimal performance.
  • Implementing fingerprinting to enhance developer experience and automatically detect native build versions.
  • Reducing the size of transmitted bundle information with incremental updates to expedite update delivery, even for users with limited mobile connectivity.
  • Utilising native networking stacks and modern protocols to reduce the load on JavaScript.
  • Adopting better security practices.

If you require support for React Native 0.76 and above, along with the New Architecture, consider migrating to the Revopush SDK.


Migration Guide

1. Remove the react-native-code-push package from your package.json.

2. Install the revopush package:

$ npm install --save @revopush/react-native-code-push


3. iOS: If your application uses AppDelegate.m, follow the setup instructions for AppDelegate.m. If you wish to switch to Swift, refer to the instructions for AppDelegate.swift. Then, navigate to the ios directory and reinstall pods using pod install.

4. Android: Follow the setup instructions. In your android/settings.gradle file, remove:


include ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
                                           

In your android/app/build.gradle file, add:


apply from: "../../node_modules/@revopush/react-native-code-push/android/codepush.gradle"
              

In newer versions of React Native, Kotlin is used instead of Java. Add the following to your MainApplication.kt file:


import com.microsoft.codepush.react.CodePush

class MainApplication : Application(), ReactApplication {
    override val reactNativeHost: ReactNativeHost =
        object : DefaultReactNativeHost(this) {
            override fun getPackages(): List = PackageList(this).packages.apply {
                // Packages that cannot be autolinked yet can be added manually here, for example:
                // add(MyReactNativePackage())
            }

            // Override the getJSBundleFile method to let
            // the CodePush runtime determine where to get the JS
            // bundle location from on each app start
            override fun getJSBundleFile(): String {
                return CodePush.getJSBundleFile()
            }
        }
}
              

Rebuild your application.

5. In your JavaScript code, replace all imports from react-native-code-push with @revopush/react-native-code-push.

If you find any issues, please create an issue in Revopush SDK repository.

Join Revopush!

Avoid last-minute headaches!