React Native New Architecture
NextPush fully supports apps running on React Native's New Architecture (Fabric + TurboModules).
The original react-native-code-push package from Microsoft is no longer maintained and does not work with the New Architecture. Use the community-maintained drop-in replacement instead:
@code-push-next/react-native-code-push (the CodePushNext repository now lives under the Codemagic organisation; the npm package name is unchanged)
It speaks the same CodePush protocol, exposes the same JavaScript API (codePush.sync(), checkForUpdate(), codePush() HOC, …) and works on both the Old and the New Architecture. No server-side changes are required.
Supported versions
| React Native | Package version | Architecture |
|---|---|---|
| 0.76 – 0.79 | 10.0+ | Old and New |
| 0.80 | 10.1+ | Old and New |
| 0.81 | 10.3+ | Old and New |
| 0.82 and newer | 10.4+ | New Architecture only |
Always use the latest release of the package (10.4.3 at the time of writing) for the newest React Native versions. Microsoft's original react-native-code-push stopped at 9.0.1 (December 2024), is deprecated on npm and never supported the New Architecture.
The package is maintained by a third party. NextPush tracks the upstream releases and tests each one against the API; if upstream maintenance ever stops, we publish a fork under the NextPush organisation and announce it on the blog.
Expo projects
The package ships an Expo config plugin, so a managed Expo project (prebuild) can use the CodePush SDK without hand-editing native files:
{
"expo": {
"plugins": [
[
"@code-push-next/react-native-code-push/expo",
{
"CodePushDeploymentKey": "YOUR_DEPLOYMENT_KEY",
"CodePushServerURL": "https://api.nextpush.center"
}
]
]
}
}
Run npx expo prebuild afterwards. Apps that use expo-updates instead of the CodePush SDK can point it at NextPush directly: see Expo Updates (beta).
1. Install
npm install @code-push-next/react-native-code-push
# or
yarn add @code-push-next/react-native-code-push
cd ios && pod install
2. Native setup
Follow the platform setup in the package README (Android MainApplication and iOS AppDelegate changes). It is identical to the original CodePush setup.
3. Point the SDK to NextPush
Android
android/app/src/main/res/values/strings.xml
<string moduleConfig="true" name="CodePushDeploymentKey">YOUR_DEPLOYMENT_KEY</string>
<string moduleConfig="true" name="CodePushServerUrl">https://api.nextpush.center</string>
iOS
ios/<YourApp>/Info.plist
<key>CodePushDeploymentKey</key>
<string>YOUR_DEPLOYMENT_KEY</string>
<key>CodePushServerURL</key>
<string>https://api.nextpush.center</string>
Deployment keys are shown on the app page in the NextPush dashboard.
4. Use it in JavaScript
import codePush from "@code-push-next/react-native-code-push";
function App() {
// ...
}
export default codePush({
checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
installMode: codePush.InstallMode.ON_NEXT_RESTART,
})(App);
5. Release updates
Nothing changes on the release side:
nextpush release-react -a companyName/AwesomeApp -d Production
Migrating from react-native-code-push
- Remove
react-native-code-pushand install@code-push-next/react-native-code-push. - Replace every
from "react-native-code-push"import withfrom "@code-push-next/react-native-code-push". - Re-run
pod installand rebuild the native app.
Your existing deployment keys and releases keep working.