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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.