Start hereProduction Deployment

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:
    npm install -g expo-cli
    Verify installation with expo --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):
    • Android: Google Play Developer account (Sign Up).
    • iOS: Apple Developer account (Sign Up).
  • EAS CLI: Install using:
    npm install -g eas-cli
    Verify with eas --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

  1. Navigate to Expo.dev and click Sign In (top right). If you don’t have an account, click Sign Up to create one.
  2. In your project’s root directory, log in to Expo via the terminal:
    npx expo login
    Enter your Expo username and password when prompted. Verify login with:
    npx expo whoami

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.

{
	"build": {
		"preview": {
			"android": {
				"distribution": "internal"
			},
			"ios": {
				"simulator": false,
				"distribution": "internal"
			}
		},
		"production": {
			"android": {
				"buildType": "aab",
				"distribution": "store"
			},
			"ios": {
				"simulator": false,
				"distribution": "store"
			}
		}
	}
}

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:

eas build --platform android --profile preview

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:

eas build --platform ios --profile preview

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:

  1. Go to your project’s builds page on Expo:
    https://expo.dev/accounts/YOUR_USERNAME/projects/YOUR_PROJECT_NAME/builds
    Replace YOUR_USERNAME and YOUR_PROJECT_NAME with your Expo account and project details.
  2. 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.
  3. 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:

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.

On this page