How to do it...

  1. In order to use CodePush, we will need to install the CodePush CLI and create a free account. This can be done in a Terminal by running the following two commands:
npm install -g code-push-cli
code-push register
  1. The next step is to register our app with CodePush. Make a note of the deployment keys for the app provided by the output from running code-push register. We will be using the staging key for this recipe. The documentation suggests adding one app per platform, with an -IOS or -Android suffix for each. To add the app to CodePush, use this command:
code-push app add TestDeployApp-IOScode-push app add TestDeployApp-Android
  1. We're also going to need the React Native CodePush module installed in the React Native project ...

Get React Native Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.