Software Developer@ Blue Ripples Technologies
Traditional mobile app deployment requires app store approval, which takes time and slows down bug fixes or new feature releases. This is where CodePush comes into play. CodePush enables faster updates by bypassing the app store approval process, allowing you to instantly push bug fixes or new features to users without requiring them to download a new version.
CodePush is an App Center cloud service that enables React Native developers to deploy mobile app updates directly to their users’ devices. It enables you to instantly deploy JavaScript, HTML, and CSS updates, without going through the usual app store submission process. This capability is incredibly powerful for making quick changes like:
However, major updates, such as changes to native code or configurations that involve the app’s binary, will still require app store approval.
Here’s a quick overview of how you can integrate CodePush into your React Native app:
npm install
npm install --save react-native-code-push
We used Apache APISIX as our API gateway. Apache APISIX provides rich traffic management features like Load Balancing, Dynamic Upstream, Canary Release, Circuit Breaking, Authentication, Observability, etc. APISIX provides a rich set of plugins for integrations by default. APISIX also provides the flexibility to write and integrate custom plugins. Lua is the default language to write plugins , but users can also write external Plugins in programming languages like Java, Python, and Go.
#import <CodePush/CodePush.h>
return [CodePush bundleURL];
<key>CodePushDeploymentKey</key> <string>PUT_YOUR_DEVELOPMENT_KEY_HERE</string>
Android
include ':app', ':react-native-code-push' project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
@Override protected String getJSBundleFile() { return CodePush.getJSBundleFile(); }
<resources> <string name="app_name">AppName</string> <string moduleConfig="true" name="CodePushDeploymentKey"> DeploymentKey</string> </resources>
npm install -g appcenter-cli
appcenter login
Configure the App: CodePush requires a unique deployment key for each app environment (e.g., Staging, Production). This key can be found in the CodePush dashboard in Appcenter’s Distribute tab. Then select the settings icon in the top right corner.
code-push release-react <appName> <platform> --d <environment> // eg:- appcenter codepush release-react -a appcenter-abc.com/ABC_IOS -d Development
CodePush.sync({ updateDialog: true, installMode: CodePush.InstallMode.IMMEDIATE }); MyApp = codePush(MyApp) //At the bottom
CodePush is ideal for releasing updates to JavaScript or asset changes. However, it cannot be used for:
Android
Solution : In android/app/build.gradle, at the very bottom of file, after apply plugin: ‘com.google.gms.google-services’ add the following
googleServices { disableVersionCheck = true}
Microsoft has announced that Visual Studio App Center will be officially retired on March 31, 2025. After this date, users will no longer be able to sign in or make API calls through App Center.
What is next?
Ans:- There are alternative solutions for all App Center services like Azure Pipelines, Standalone version of codepush, etc.: https://learn.microsoft.com/en-us/appcenter/retirement
Ans: App Center functionality will not change before It is fully retired, and all features will continue to work without interruption.
Ans:- No, On the official retirement date (March 31, 2025), they will block sign-ins and API calls. And no longer be able to sign into the App Center web-portal nor be able to make API calls.
Ans:- For build data: download data from your build by going to: appcenter.ms > [your account or organization] > [app name] > build > [branch name] > [build number] > download
https://learn.microsoft.com/en-us/appcenter/build/troubleshooting/backup-data
Ans:- It will not be affected. They have prepared a special version of CodePush to integrate into the app and run independently from App Center. The standalone version is compatible with app centre service – the same SDK is used, just configuration will need to be updated.
Ans:- Via blob or email. They will share the details to access the codebase and technical doc to setup our own infra and use it.
CodePush is a powerful tool that saves time and enhances user experience by providing smooth, seamless updates. It offers a faster, more dynamic way to push updates for React Native, Xamarin, and Cordova apps, though it is limited to JavaScript, assets, HTML, and CSS updates. Once configured, deployments and releases can be done with a single command. While it doesn’t support binary or native code changes, CodePush is highly effective for delivering bug fixes, UI updates, and other front-end changes, making it a valuable tool for mobile app development.