React Native CodePush SDK pre-configured for DeployPulse, the hosted CodePush alternative for React Native OTA updates.
Push JavaScript and asset updates to your users instantly, without an app store release. Works with both Expo managed workflow (via config plugin) and bare React Native.
- Compatibility
- Installation
- Expo Managed Workflow Setup
- Bare React Native Setup
- Usage
- Releasing Updates
- API Reference
- Upstream
| React Native version | SDK version |
|---|---|
| < 0.76 | Use microsoft/react-native-code-push |
| 0.76 – 0.79 | 10.0+ (Old & New Architecture) |
| 0.80 | 10.1+ (Old & New Architecture) |
| 0.81 | 10.3+ (Old & New Architecture) |
| 0.82+ | 10.4+ (New Architecture) |
| Expo SDK | Supported |
|---|---|
| 52+ | ✓ |
| < 52 | ✗ |
Platforms: iOS 7+, Android 4.1+ (TLS 1.2), Windows (UWP, untested)
npm install @deploypulseio/react-native-code-push
# or
yarn add @deploypulseio/react-native-code-pushGet your deployment keys from the DeployPulse dashboard or via the CLI:
dpctl deployment list <AppName>Add the plugin to your app.json / app.config.js. The server URL is pre-configured to DeployPulse, so you only need to provide your deployment keys.
{
"expo": {
"plugins": [
[
"@deploypulseio/react-native-code-push",
{
"ios": {
"CodePushDeploymentKey": "YOUR_IOS_DEPLOYMENT_KEY"
},
"android": {
"CodePushDeploymentKey": "YOUR_ANDROID_DEPLOYMENT_KEY"
}
}
]
]
}
}Then run prebuild (or let EAS Build handle it):
npx expo prebuildThe plugin automatically:
- Adds
CodePushDeploymentKeyandCodePushServerURLtoInfo.plist(iOS) - Adds
CodePushDeploymentKeyandCodePushServerUrltostrings.xml(Android) - Patches
AppDelegatewith the CodePushbundleURL()override (iOS) - Patches
MainApplication.ktwith CodePush package registration andgetJSBundleFile()(Android) - Adds the CodePush gradle apply line to
app/build.gradle(Android)
No manual native file editing required.
The plugin defaults to https://apps.deploypulse.io. To point at a different server (e.g. a self-hosted instance), pass serverUrl or per-platform overrides:
{
"expo": {
"plugins": [
[
"@deploypulseio/react-native-code-push",
{
"serverUrl": "https://your-own-server.example.com",
"ios": { "CodePushDeploymentKey": "YOUR_IOS_KEY" },
"android": { "CodePushDeploymentKey": "YOUR_ANDROID_KEY" }
}
]
]
}
}For bare React Native (no Expo), follow the standard native setup guides. Set the server URL to https://apps.deploypulse.io in each platform.
In Info.plist (iOS), add:
<key>CodePushDeploymentKey</key>
<string>YOUR_IOS_DEPLOYMENT_KEY</string>
<key>CodePushServerURL</key>
<string>https://apps.deploypulse.io</string>In android/app/src/main/res/values/strings.xml (Android), add:
<string name="CodePushDeploymentKey" translatable="false">YOUR_ANDROID_DEPLOYMENT_KEY</string>
<string name="CodePushServerUrl" translatable="false">https://apps.deploypulse.io</string>Wrap your root component with the CodePush higher-order component:
import CodePush from '@deploypulseio/react-native-code-push';
const App = () => <View>...</View>;
export default CodePush(App);With options:
export default CodePush({
checkFrequency: CodePush.CheckFrequency.ON_APP_RESUME,
installMode: CodePush.InstallMode.ON_NEXT_RESTART,
})(App);Use the DeployPulse CLI (dpctl) to push updates:
# Bundle and release
dpctl release-react <AppName> <Platform>
# Example
dpctl release-react MyApp ios
dpctl release-react MyApp androidThe JavaScript API is identical to the original CodePush SDK. Full reference:
This package is a fork of react-native-code-push (formerly CodePushNext, now maintained by Codemagic), which is itself a fork of microsoft/react-native-code-push. We track upstream changes and apply DeployPulse-specific configuration on top.
DeployPulse additions over upstream:
- Expo managed workflow config plugin (
expo.js) with pre-configured server URL @deploypulseionpm scope and package metadata- Automated npm publish via GitHub Actions