CodePush for React Native
React Native CodePush: fix it today, not after review.
CodeOnAir CodePush sends a new JavaScript bundle to your React Native app over the air. Release from your terminal or CI, and devices pick it up on their next launch, or right away when it’s mandatory. A hosted alternative to App Center CodePush, with the API you already know.
- React Native 0.70+
- New Architecture & bridgeless
- Hermes
- Staged rollouts
- Automatic rollback
- CLI & CI
How CodePush works
From git push to the phone in five steps.
A React Native app is a native shell that runs a JavaScript bundle. CodePush swaps that bundle for a newer one, while the native shell, the part the stores review, stays the same.
- 1
Release
The CLI runs the React Native bundler (and the Hermes compiler if your app uses Hermes), zips the bundle and its assets, and uploads it to your app’s Android or iOS deployment. Each release is labelled v1, v2, v3 and so on.
- 2
Check
When the app starts, CodePush.sync() asks the server whether there’s a newer release for this deployment and this binary version. Checking is free on every plan.
- 3
Download and verify
The zip is downloaded and its SHA-256 hash is checked before anything is unpacked. A corrupted or tampered bundle is refused, and the app keeps the one it has.
- 4
Install
The new bundle runs according to the install mode: on the next start (the default for optional releases), right away (the default for mandatory ones), on resume, or while the app is in the background.
- 5
Confirm, or roll back
The next sync() confirms the update started. If the app crashes before that, the next launch goes back to the previous bundle, reports the rollback, and never offers that release to the device again.
- 6
Watch it in the dashboard
Downloads, installs, rollbacks and active devices for every release, day by day. Raise a rollout, make a release mandatory, disable it or roll back from the dashboard or the CLI.
Set up once
Three changes to your app.
- 1Add the SDKnpm install @codeonair/code-push-react-native, then pod install for iOS. In the dashboard, open your app’s CodePush page and click Set up CodePush to get an Android and an iOS deployment key.
- 2Load the bundleOne change in MainApplication.kt and AppDelegate.swift so the app loads the CodePush bundle in release builds, plus your deployment key and the server URL in strings.xml and Info.plist.
- 3Sync on launchCall CodePush.sync() when the app starts. It confirms the running update, then checks for a new one. Choose when updates install: on the next start, immediately, on resume or in the background.
- CodePush SDK for React Native@codeonair/code-push-react-native 1.1.1 on npm
$ npm install @codeonair/code-push-react-native - CodePush CLI (beta)@codeonair/code-push-cli 0.10.1 on npm
$ npm install -g @codeonair/code-push-cli@beta
$ codeonair-codepush release-react shop-android -t 1.0 -d "Fix checkout"Bundling android (Hermes)… Uploading 0.53 MB…✔ Released v4 to shop-android for app version 1.0.$ codeonair-codepush release-react shop-ios -t 1.0 --rollout 20✔ Released v3 to shop-ios for app version 1.0, 20% rollout.$ codeonair-codepush rollback shop-android✔ Rolled back shop-android: v5 restores v3
The code
What the integration looks like.
These are the snippets from the SDK’s README for current React Native templates. React Native 0.70 to 0.76 use the same calls inside DefaultReactNativeHost and AppDelegate.mm; the README and the project setup docs show both.
1. Your deployment key
Copy the key for each platform from CodePush → Android / iOS in the dashboard. The keys are different per platform.
# android/app/src/main/res/values/strings.xml<string moduleConfig="true" name="CodePushDeploymentKey">cpd_…</string><string moduleConfig="true" name="CodePushServerUrl">https://app.codeonair.com</string># ios/<App>/Info.plist<key>CodePushDeploymentKey</key><string>cpd_…</string><key>CodePushServerURL</key><string>https://app.codeonair.com</string>
2. Load the update’s bundle
Release builds load the downloaded bundle when there is one, and the bundle inside the app when there isn’t. Debug builds keep using Metro.
# MainApplication.ktimport com.codeonair.codepush.CodeOnAirCodePushgetDefaultReactHost(context = applicationContext,packageList = PackageList(this).packages,jsBundleFilePath = CodeOnAirCodePush.getJSBundleFile(applicationContext),)# AppDelegate.swiftoverride func bundleURL() -> URL? {#if DEBUGRCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")#elseCodeOnAirCodePush.bundleURL()#endif}
3. Sync on every launch
sync() confirms the running update first, so an update that crashes before this point is rolled back on the next launch.
import CodePush from "@codeonair/code-push-react-native";useEffect(() => {CodePush.sync({installMode: CodePush.InstallMode.ON_NEXT_RESTART,mandatoryInstallMode: CodePush.InstallMode.IMMEDIATE,},(status) => {if (status === CodePush.SyncStatus.UPDATE_INSTALLED) console.log("Update installed.");},);}, []);
4. Release from CI
Create a CLI access key for your CI, store it as a secret, and the CLI reads it from the environment. No login step.
- run: npm install -g @codeonair/code-push-cli@beta- run: codeonair-codepush release-react shop-android -t 1.0.0 -d "${{ github.sha }}"env:CODEONAIR_ACCESS_KEY: ${{ secrets.CODEONAIR_ACCESS_KEY }}CODEONAIR_SERVER_URL: https://app.codeonair.com
Shipping a new screen over the air? Send people straight to it with AppLinks deep links: Universal Links and App Links that open the right screen, even after a fresh install.
Control every build
See who has which build, and change it from the dashboard.
- Separate Android and iOS deployments, each with its own key
- Optional or mandatory releases; mandatory ones apply right away by default
- Staged rollouts by percentage — the same devices stay in the rollout
- Enable, disable or edit any build’s rollout, mandatory flag and notes; the target version is fixed once released
- Release notes shown in the dashboard and in the optional update dialog
- Roll back to the previous release, or to any earlier one, in one click
- Downloads, installs, rollbacks and active devices per build, day by day
- SHA-256 verification of every download; Hermes bytecode supported
- CLI access keys for CI, with environment variables for GitHub Actions, GitLab CI and others
- A new store build always starts on its own bundle; older updates are cleared
Features in detail
The parts that matter on a bad release day.
Release with -t 1.2.0, -t 1.2.x or -t *. A device only gets bundles built for the native code it has, so a JavaScript change that needs a new native module never reaches an old build.
ON_NEXT_RESTART, IMMEDIATE, ON_NEXT_RESUME and ON_NEXT_SUSPEND. minimumBackgroundDuration stops a quick app switch from restarting the app.
Install mandatory updates with ON_NEXT_SUSPEND while the app is in the background, and restoreScreen brings the user back to the screen they were on.
Release to 20% of devices with --rollout 20, watch rollbacks in the dashboard, then raise it with patch --rollout 100. Devices stay in or out of the rollout as it grows.
A crash before the app confirms the update rolls the device back by itself. codeonair-codepush rollback adds a release that carries the earlier bundle, so every device moves back on its next check.
Kotlin and Swift apps can ship images, JSON, strings and WebView content with the same deployments and CLI: codeonair-codepush release shop-android ./content 1.2.0.
Compared
CodeOnAir CodePush, App Center CodePush and Expo EAS Update.
Microsoft retired App Center, and its hosted CodePush service, on 31 March 2025, and archived the react-native-code-push SDK and the standalone CodePush server in May 2025. Expo’s EAS Update is the other well-known hosted option. Here’s how the three compare, including where we fall short.
| CodeOnAir CodePush | App Center CodePush | Expo EAS Update | |
|---|---|---|---|
| Status | Live, hosted by us | Retired 31 March 2025; SDK and server archived | Live, hosted by Expo |
| Client SDK | @codeonair/code-push-react-native, with the original API names | react-native-code-push (archived; its README says it won’t support the New Architecture) | expo-updates (Expo projects, or React Native projects that install it) |
| New Architecture | Yes, including bridgeless; RN 0.70+ | No | Yes, with expo-updates |
| Which builds get an update | Binary version: exact, range (1.2.x) or * | Binary version | Runtime version, plus channels and branches |
| Staged rollouts | Yes (--rollout) | Yes | Yes (--rollout-percentage) |
| Rollback | Automatic on a crash at start, plus rollback to any release | Automatic, plus a rollback command | Republish an earlier update, or roll back to the embedded bundle |
| Staging and production | One deployment per platform; use a second app for staging | Several deployments per app | Channels |
| Pricing unit | Update downloads: 5,000 a month free, then from ₹1,499 / $19 a month | Was free; the service has closed | Monthly active users: 1,000 free, then paid plans |
| Self-hosting | No | The archived code-push-server, as is | No |
Facts about other products are from their own pages, checked on 25 October 2026: the archived react-native-code-push repository, Expo’s EAS Update docs and pricing. Prices and limits change, so check them again. The head-to-head, with pricing examples and migration steps, is CodeOnAir CodePush vs Expo EAS Update; the full write-up, with self-hosted and other hosted options, is in CodePush alternatives in 2026.
Which one should you pick?
An honest rule of thumb.
You’re on Expo and use expo-updates: stay with EAS Update. It’s built for that workflow, and moving to any CodePush-style service means a different SDK and release process. The details are in CodeOnAir CodePush vs EAS Update.
You were on App Center CodePush: a CodePush-compatible API keeps the change small. Swap the package, change the bundle loader in two native files, and release with the new CLI. Our step-by-step App Center CodePush migration walks through it, and react-native-code-push on the New Architecture explains why staying on the archived SDK gets harder with every React Native release.
You need self-hosting or data residency: we don’t offer that. Look at the self-hosted options in our comparison of CodePush alternatives.
You release often to many users: price each option in its own unit. Download-based pricing costs more if you release daily to a large base; MAU-based pricing costs more if you have many users and release rarely. CodeOnAir’s allowances are on the pricing page, and the same workspace also covers deep links and push notifications.
CodePush questions
What can I update over the air?
Your React Native JavaScript bundle and the images and assets it ships with. Changes to native code, new native modules, SDK upgrades, permissions and Info.plist or AndroidManifest.xml changes still need a store release.
Is it allowed by Apple and Google?
Both stores allow interpreted code such as JavaScript to be updated, as long as the update doesn't change the app's primary purpose. Use CodePush for fixes and improvements, not to add features the reviewed app doesn't have.
What happens if an update crashes?
The SDK keeps the previous bundle. If the new one crashes before the app confirms it started (CodePush.sync() does that for you), the next launch goes back to the previous bundle, the failure is reported in the dashboard, and that update is not offered to the device again.
Which apps get an update?
Each release targets binary versions: an exact version such as 1.2.0, a range such as 1.2.x, or every version (*). Only devices running a matching store build get it. The target can't be changed after release; to ship the same fix to another version, release it again.
Which React Native versions are supported?
React Native 0.70 and newer, on the Old Architecture, the New Architecture and bridgeless mode, for Android and iOS. It's tested on devices with React Native 0.76 (Old and New Architecture) and 0.86. The CLI compiles Hermes bytecode when your app uses Hermes.
Do I have to rewrite my App Center CodePush code?
Usually not much. The SDK keeps the original API names: sync, InstallMode, SyncStatus, checkForUpdate, notifyAppReady and the codePush(App) wrapper. You swap the package, point the native files at the new bundle loader, and use your new deployment keys.
Does it work with Expo?
The SDK needs two native changes, in MainApplication and AppDelegate, and there's no Expo config plugin for it yet, so it suits React Native apps whose native folders you manage. If you're on Expo with expo-updates, Expo's EAS Update is the natural choice.
Can I run staging and production releases?
Each app has one deployment per platform, Android and iOS, each with its own key. For a separate staging track, create a second app for your staging builds. Staged rollouts (for example 20% of devices first) cover most of what a staging deployment was used for.
How is CodePush counted on my plan?
By update downloads per month: 5,000 on Free, 25,000 on Starter, 500,000 on Growth and 2,000,000 on Scale. Checking for updates is free. Past the allowance, update checks answer 'no update' until next month, so apps keep running the bundle they have.
Can native Android and iOS apps use it?
Native apps can't replace their code over the air, but they can replace content: images, JSON, strings you load yourself and web content shown in a WebView. The content update SDKs for Kotlin and Swift use the same deployments, keys and CLI as React Native CodePush.
Coming from App Center? Follow the step-by-step App Center CodePush migration, read how to keep shipping React Native updates after App Center and pick the right install mode: IMMEDIATE or ON_NEXT_RESTART. Still choosing? Compare CodePush alternatives: EAS Update, self-hosting and hosted services. The full SDK reference and CLI options are in the CodePush docs.
Ship your next fix over the air.
Add the SDK, release from the CLI or CI, and roll out to a few devices first. Try Growth free for 30 days — no card needed.