Skip to content

Revopush 2.0 Migration guide

This guide will help you to migrate from Revopush 1.x to 2.0. If you have not used Revopush yet, please refer user guide.

Configure CLI

To get all the benefits of Revopush 2.0 you need to use the latest version of CLI (0.0.8 and above). If you had one installed you can upgrade it

shell
npm upgrade -g @revopush/code-push-cli

or in case of CI/CD you need to install it

shell
npm install -g @revopush/code-push-cli@0.0.8

Ensure revopush -v is 0.0.8 and above

shell
revopush -v
0.0.8

Configure Revopush SDK

Your app needs to use Revopush SDK 2.5.0-rc.2 and above. To update version of Revopush SDK in the root folder of the app execute

shell
npm install @revopush/react-native-code-push@2.5.0-rc.2

Make a release

To use Diff updates together with Revopush SDK 2.0, you must first create a base release for the specific binary version of the app you are targeting.

What is a base release?

A base release is a snapshot of your assets and JavaScript bundle exactly as they were shipped to the app stores together with your IPA/APK.

This snapshot is then used as a baseline to generate diffs only for assets and the JS bundle that already exist in the store build and on users’ devices.

As a result, update payload sizes are reduced by 10–20×, and update delivery to users becomes significantly faster.

To create a base release, you first need to build release APK/IPA files for the target platform and then provide these files as CLI parameters to create the base release.

shell
revopush release-native <APPLICATION_NAME> ios ./path_to_ipa/app.ipa
shell
revopush release-react <APPLICATION_NAME> android ./path_to_ipa/app.apk

Full command specification:

shell
revopush release-native <appName> <platform> <targetBinary> [options]

Options:
  --help                     Show help  [boolean]
  -d, --deploymentName       Deployment to release the update to  [string] [default: "Staging"]
  -t, --targetBinaryVersion  Semver expression that specifies the binary app version(s) this release is targeting (e.g. 1.1.0, ~1.2.3).  [string] [default: null]
  -v, --version              Show version number  [boolean]

Regular release

shell
revopush release-react <APPLICATION_NAME> ios -d <DEPLOYMENT_NAME>
shell
revopush release-react <APPLICATION_NAME> android -d <DEPLOYMENT_NAME>

WARNING

To properly calculate diff updates when using -o or --outputDir parameter, the output directory must end with CodePush.

For example:

shell
revopush release-react <APPLICATION_NAME> android -d <DEPLOYMENT_NAME> -o ./build/CodePush

Read more about Releases in Releasing updates guide