Deploying the Mobile App (EAS Build)

Expo Application Services (EAS) builds your React Native app into a shareable APK (Android) or IPA (iOS).

Step 1: Install EAS CLI

npm install -g eas-cli

Step 2: Log In to Expo

eas login
# Enter your Expo username and password

Step 3: Configure EAS

Create mobile/eas.json:

{
  "cli": {
    "version": ">= 3.0.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "android": {
        "buildType": "apk"
      },
      "ios": {
        "simulator": true
      }
    },
    "production": {}
  },
  "submit": {
    "production": {}
  }
}

Step 4: Build for Android (APK)

cd mobile
eas build --platform android --profile preview

This takes 5-10 minutes. EAS uploads your code to Expo's servers, builds it, and gives you a download link.

The result is a .apk file you can: - Share with anyone (they install it on Android) - Sideload onto devices - Upload to the Google Play Store

Step 5: Build for iOS (IPA)

eas build --platform ios --profile preview

Note: iOS builds require an Apple Developer account ($99/year) and a certificate. For testing, use the iOS simulator build (--profile preview builds for simulator).

Step 6: Share with Testers

After the build completes, EAS provides a URL like:

https://expo.dev/accounts/yourname/projects/mobile/builds/abc123

Share this URL — testers can install the APK directly on Android.

Step 7: Update the API URL for Production

Before building for production, make sure App.tsx points to your deployed backend:

const API_BASE_URL = "https://YOUR_USERNAME-aiproject-backend.hf.space";

Optional: Publishing to App Stores

Google Play Store

  1. Create a Google Play Developer account ($25 one-time)
  2. In eas.json, use the production profile
  3. Run eas build --platform android --profile production
  4. Go to Google Play Console → Create new app
  5. Upload the .aab file from the build
  6. Fill in store listing, privacy policy, etc.
  7. Submit for review

Apple App Store

  1. Create an Apple Developer account ($99/year)
  2. Run eas build --platform ios --profile production
  3. Go to App Store Connect → Create new app
  4. Upload the IPA with Transporter app
  5. Fill in store listing
  6. Submit for review

Alternative: OTA Updates

For quick updates without rebuilding, use Expo Updates:

eas update --branch production --message "Fix typo in chat UI"

Users get the update instantly (no app store review). This only works for JavaScript changes — native code changes still need a build.