Learn how to add CodePush to an existing app using one of our provided client SDKs:
Deploy code updates directly to users
Manage alpha, beta and production apps
Cordova and React Native ready
CodePush is a cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users’ devices. It works by acting as a central repository that developers can publish certain updates to (e.g. JS, HTML, CSS and image changes), and that apps can query for updates from (using our provided client SDKs). This allows you to have a more deterministic and direct engagement model with your end-users, while addressing bugs and/or adding small features that don’t require you to re-build a binary and/or re-distribute it through any public app stores.
You manage your CodePush account using our NodeJS-based CLI. To install it, open a command prompt or terminal, and type npm install -g code-push-cli
Note: On OSX and Linux, you may need to prefix this command with sudo
npm install -g code-push-cli
Before you can release any updates, you first need to create a CodePush account. To do this, simply type the following command via the CLI and authenticate with either your GitHub or Microsoft account: code-push register
code-push register
In order to let the service know about your app, simply register it using a recognizable name. For example: code-push app add MyApp
code-push app add <appName>
Add the appropriate CodePush client SDKs to your app, and configure them to query for updates against the app deployment created above.
Follow the app type specific details here:
After making changes to your app’s code or assets, push the update to your staging environment by using the CLI command which corresponds to the app type you are building (React Native or Cordova), and specifies the name of your CodePush app and the platform that your update is targetting (iOS or Android).
Run the release-react
comand in the CodePush CLI, which will handle bundling your JavaScript and asset files and releasing the update to the CodePush server. For example: code-push release-react MyApp ios
.
code-push release-react
<appName> <platform>
Run the release-cordova
comand in the CodePush CLI, which will handle bundling your JavaScript and asset files and releasing the update to the CodePush server. For example: code-push release-cordova MyApp android
.
code-push release-cordova <appName> <platform>
And that's it! All users running your app will receive the update using the experience you configured in step #4. For more details, refer to the CLI and client SDK documentation (Cordova, React Native).
See more cool apps using CodePush