Here is the list of essential Expo/EAS commands you need for building, deploying, and publishing apps using Expo.
Whether you are building an Android or iOS app, these commands are very handy.
Table of Contents
This is the primary command to start the development server and then view your project in Expo DevTools during development.
expo start
Once this command runs successfully, a QR code will be generated. Open your Pythical device (either Android or iOS). Install the app “Expo Go” from the Play Store. Scan the QR code.
That’s it. Now you will be able to see your app running in real-time. This is the first command you need to run your application using Expo.
If you are building your app first time using Expo, you should read this document- creating a react-native app using the Expo tool.
Here is the eas
command to build the APK file for Android, locally.
eas build --platform android --local
Remember:
Command expo build
serves the same purpose as eas build
for creating a package build. But eas build
provides better features than expo build
as better caching, faster execution, etc.
By default, if you try to download the expo package, it downloads .aab
file.
eas build -p android
We can not install it on our Android mobile. The .aab
bundle file is a package bundle that is usually used to upload the bundle on the Play Store.
Alternatively, you can use –platform all to create a build for both Android and iOS.
eas build --platform all
You can also pass the message for the build.
eas build --platform android --message "Your message"
This message will be visible on the EAS website. It comes very handy to take a note with the purpose of the build.
To download the .apk
file, you have to tweak the configuration code.
Update eas.json
configuration file and set the apkDownload
parameter (called as profile). You can name it anything.
{ "cli": { "version": ">= 3.14.0" }, "build": { "apkDownload": { "android": { "buildType": "apk" } } } }
Now run the below command to download the Android APK file.
eas build -p android --profile apkDownload
This command builds the package bundle and then uploads it to the EAS. You will get the link to download the bundle. You can download the .apk
bundle and install it on your Android device.
If you don’t provide --profile
flag, the default profile is “production” (if it exists in eas.json
).
The major advantage of this command is that you don’t need Android SDK on your local system.
Run the below command to get the list of all the builds.
eas build:list
On execution, you will the list of all the builds in detail below.
ID <ID>
Platform Android
Status finished
Distribution store
SDK Version 49.0.0
Version 1.0
Version code 1
Commit <commit_id>
Logs <expo_dev_log_path>
Artifact <build_path>
Started at 9/17/2023, 11:47:30 PM
Finished at 12/2/2023, 12:45:51 AM
Started by ani
Expo publish
command published the app to the Expo server.
expo publish
Basically after making changes in the app and testing locally, you can publish the app on the Expo server.
Your updated app will be available to the users who have already installed your app through the “Expo Go” app. This allows them to download and use the app from the Expo Server without installing it from the Play Store.
This simple command publishes your app to the respective app store like “Google Play Store” for Android and “Apple App Store” for iOS.
eas submit
With this command, EAS takes care of code signing, and other requirements specific to each platform. Doing it manually is very cumbersome.
Before submitting your app, you should configure the keystore credentials correctly.
Use this command to configure the various aspects of the EAS build. You can specify the environment variables, customize the build process, specify the build profiles, etc.
eas build:configure
It helps you to fine-tune your app-building process as per your project requirements.
There are many other commands such as expo rebuilding.
Use these commands with the necessary flags. You can find all the available flag options using the -h
option.
These are very useful and handy commands if you are developing your app using Expo.
Any doubt? Write me in the comment section below. Happy coding!