Mobile App Deployment with Expo
This guide provides step-by-step instructions to configure and deploy your React Native app for development testing using Expo and EAS (Expo Application Services). By the end, you'll have a testable `.apk` (Android) or `.ipa` (iOS) file for internal distribution.
Prerequisites
Before starting, ensure the following are set up:
- Node.js:(v22.14.0) Download from Node.js.
- Expo CLI: Install globally using:
Verify installation withexpo --version
. See Expo CLI Setup for details. - Expo Account: Sign up at Expo.dev or log in if you already have an account.
- Developer Accounts (for store submission):
- EAS CLI: Install using:
Verify witheas --version
. - Project Setup: A React Native project initialized with Expo (e.g., via
npx create-expo-app
).
Ensure your project is version-controlled (e.g., Git) and backed up before proceeding.
Step 1: Log In to Expo
- Navigate to Expo.dev and click Sign In (top right). If you don’t have an account, click Sign Up to create one.
- In your project’s root directory, log in to Expo via the terminal:
Enter your Expo username and password when prompted. Verify login with:
Step 2: Configure EAS Build with eas.json
Create an eas.json
file in your project’s root directory to define build configurations. This file specifies settings for Android and iOS builds.
Explanation:
- The
preview
profile generates.apk
(Android) and.ipa
(iOS) files for internal testing. - The
production
profile is for store submissions (e.g.,.aab
for Google Play).
Step 3: Build the App for Testing
Use EAS to build your app for internal distribution. Ensure you’re in the project’s root directory.
Android Build
To generate an .apk
file for Android:
This command:
- Builds an
.apk
file for internal testing. - Uploads the build to Expo’s servers.
- Provides a URL to track progress on Expo.dev.
iOS Build
To generate an .ipa
file for iOS:
Important for iOS Builds
You need an Apple Developer account and configured provisioning profiles for iOS builds. Run eas credentials
to set up credentials or visit Expo.dev to manage them.
Step 4: Download and Test Your Build
Once the build completes:
- Go to your project’s builds page on Expo:
ReplaceYOUR_USERNAME
andYOUR_PROJECT_NAME
with your Expo account and project details. - Locate the latest build and download:
.apk
for Android: Install on an Android device or emulator for testing..ipa
for iOS: Use tools like Xcode or TestFlight for testing on iOS devices.
- Test thoroughly to ensure functionality before proceeding to production.
Step 5: Publish to App Stores (Optional)
To deploy your app to the Google Play Store or Apple App Store, follow these official guides:
- Android: Android Production Build Guide
- iOS: iOS Production Build Guide
These guides cover signing, optimizing, and submitting your app for production release.
Troubleshooting Common Issues
- Login Issues: Ensure correct credentials with
npx expo whoami
. If issues persist, log out (npx expo logout
) and log in again. - Build Failures: Check build logs on Expo.dev for errors. Common issues include missing credentials or incorrect
eas.json
settings. - iOS Credential Errors: Verify your Apple Developer account is linked via
eas credentials
. - Slow Builds: Ensure a stable internet connection, as EAS uploads your project to Expo’s servers.
For further assistance, consult the Expo Documentation or community forums.
🎉 Your app is now ready for testing! Share the .apk
or .ipa
with your team for feedback before publishing.