A guide to help migrate from CodePush to EAS Update.
This guide explains how to transition a React Native project that uses CodePush to use EAS Update which offers many advantages. It assumes that you're using the default React Native project structure. For assistance with migrating brownfield native apps to EAS Update, reach out to us directly.
EAS Update is available to anyone with an Expo account, regardless of whether you pay for EAS or use our free tier. You can sign up at https://expo.dev/signup.
1
To avoid conflicts and unexpected behavior, it's recommended to uninstall CodePush if you're using EAS Update. This is because your app could periodically fetch updates from both services, leading to issues, especially if you're using different configurations for each service.
Remove the CodePush SDK from your project by uninstalling the react-native-code-push
package:
-
npm uninstall react-native-code-push
You'll also need to remove CodePush references from JS and native code. Follow this guide for more detailed instructions.
2
app.json
Ensure that your project has an app.json
file with an expo
object. If you don't have anything specific to configure in your app.json
file yet, you can simply create a minimal app.json
file with an empty expo
object like this:
{
"expo": {
//... any other existing keys you have
}
}
3
expo
packageInstall the expo
package by running the command:
npx install-expo-modules@latest
If the command fails, refer to the "Installing Expo modules" guide.
4
In Xcode 14 and higher, resource bundles are signed by default, which requires setting the development team for each resource bundle target.
To resolve this issue, downgrade to an older Xcode version using the image
field in eas.json, or turn off signing resource bundles in your Podfile. See the "disable bundle resource signing" example.
5
EAS CLI is the command-line app that you will use to interact with EAS services from your terminal. To install it, run the command:
-
npm install -g eas-cli
You can also use the above command to check if a new version of EAS CLI is available. We encourage you to always stay up to date with the latest version.
We recommend using
npm
instead ofyarn
for global package installations. You may alternatively usenpx eas-cli@latest
. Remember to use that instead ofeas
whenever it's called for in the documentation.
6
If you are already signed in to an Expo account using Expo CLI, you can skip the steps described in this section. If you are not, run the following command to log in:
-
eas login
You can check whether you are logged in by running eas whoami
.
7
We have finished all the steps tailored for a CodePush-enabled bare React Native project. To proceed with the configuration of your project, please begin with Step 4 in the main guide and follow it through to completion.
You may need to edit some of the code
eas update:configure
generates depending on how you build and run your project. See Updating bare app for more details about the native changes.
8
After completing the migration and setting up your project with EAS Update, you should test your app to ensure that over-the-air updates are working correctly. To do this:
Keep in mind that since you have changed the update provider from CodePush to EAS Update, you will need to rebuild your app and submit the new build to the respective app stores (Apple App Store and Google Play Store) to ensure the update mechanism works as expected for your end-users.
Please follow the respective store guidelines for submitting a new build of your application:
After successfully submitting your app, users will be able to download and use the latest build with EAS Update integration. If your app is not updating as expected, validate your configuration.