Thursday, January 23, 2025
Migrate React Native OTA from CodePush & App Center to Stallion
Posted by

Why Migrate to Stallion for React Native OTA Updates?
While CodePush and App Center have been popular choices for managing React Native OTA updates, Stallion offers a more modern, streamlined, and feature-rich Codepush alternative solution tailored to today’s development needs.
-
End-to-End Workflow: Stallion combines CLI, SDK, and a powerful web console to handle the full lifecycle of your OTA updates—from creation and testing to production rollout and monitoring.
-
Next-Gen Rollout Control: Unlike traditional tools, Stallion gives you granular control with phased rollouts, automatic and manual rollbacks, and the ability to pause or resume updates at any time.
-
Real-Time Analytics: Track adoption metrics such as downloads, installs, and rollbacks in real time. Stallion’s console helps you make data-driven decisions to improve release quality and user experience.
-
Zero Hosting Hassle: Stallion is fully managed—no need to set up your own hosting or version control systems. Focus on shipping faster while Stallion handles the infrastructure.
-
Production-Grade Stability: Stallion’s safety-first approach helps you minimize release risks with automatic rollback of unstable updates and integrated testing flows directly within your app.
-
Customizable Update Flow via JS API: Stallion offers a
useStallionUpdate()
hook to access release details, handle available updates, and manage custom installation or error handling flows.

With Stallion, you gain a faster, safer, and more developer-friendly alternative to CodePush and App Center—built specifically for modern React Native teams.
Migration Steps from CodePush/App Center to Stallion
Migrating to Stallion from CodePush and App Center is simple and can be done in a few easy steps.
Step 1: Uninstall CodePush
Begin by removing CodePush from your React Native project:
npm uninstall react-native-code-push
Also, clean up any CodePush native configurations from your Android and iOS codebases.
Step 2: Install Stallion SDK and CLI
Add Stallion to your project:
npm install react-native-stallion
npm install --save-dev stallion-cli
For CLI details, check out the CLI Installation Docs.
Step 3: Perform Native Setup for Stallion
Follow Stallion’s native setup instructions:
-
Android: Remove Codepush and use
Stallion.getJSBundleFile()
insideMainApplication.java
to integrate Stallion updates.MainApplication.javaimport com.stallion.Stallion; @Override protected String getJSBundleFile() { return Stallion.getJSBundleFile(getApplicationContext()); }
-
iOS: Update
sourceURLForBridge()
inAppDelegate.mm
. Remove Codepush and use[StallionModule getBundleURL]
.#import <react-native-stallion/StallionModule.h> - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { #if DEBUG return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; #else return [StallionModule getBundleURL]; #endif }
Step 4: Publish Your First Stallion Release
Bundle and publish your first OTA release using the Stallion CLI:
npx stallion publish-bundle --upload-path=<orgname>/<project-name>/<bucket-name> --platform=<android/ios> --release-note="Migrated from CodePush"
Visit the Stallion Console to verify your bundle.
Step 5: Test and Promote to Production
- Open your app, use the Stallion SDK testing tab to download and apply the latest release.
- Once verified, promote the release to production via the Stallion Console.
- Use Stallion’s built-in phased rollout and rollback features to ensure a safe deployment.
Tip:
Use Stallion’s useStallionUpdate()
hook to fully customize how updates are handled inside your app, including triggering downloads, managing install flows, and handling errors or update status with complete flexibility.
With these steps, your migration to Stallion is complete! You’re now ready to manage OTA updates with greater flexibility and control.
Conclusion
With App Center retiring, Stallion offers a modern and reliable path forward for React Native OTA updates.
Stallion streamlines your release process, giving you faster updates, safer rollouts, and full control over your app’s lifecycle.
Ready to modernize your OTA workflow? Stallion is production-ready and comes with an extensive free tier to help teams get started easily.
Pro Tip:
Take advantage of Stallion’s free tier to migrate your first project and explore all its core features—no upfront cost.