Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mobile-starter.amisi.ai/llms.txt

Use this file to discover all available pages before exploring further.

Prerequisites

Install EAS CLI

Install the EAS CLI globally:
npm install -g eas-cli
Verify installation:
eas --version

Login to EAS

Authenticate with your Expo account:
eas login
Enter your Expo credentials when prompted.

Initialize EAS Project

Navigate to the mobile app directory and initialize EAS:
cd apps/mobile
eas init
You’ll be prompted to:
  1. Create a new EAS project or link to an existing one
  2. Choose a project name (or use the default from app.json)
The command will:
  • Create an EAS project in your Expo account
  • Add the project ID to app.json under extra.eas.projectId

Understanding Build Profiles

The starter includes three pre-configured build profiles in apps/mobile/eas.json:

Development Profile

For internal testing with development builds:
{
  "development": {
    "developmentClient": true,
    "distribution": "internal",
    "env": {
      "APP_ENV": "development"
    }
  }
}
  • Includes development client for debugging
  • Internal distribution (not for app stores)
  • Uses development environment variables

Preview Profile

For testing builds before production:
{
  "preview": {
    "distribution": "internal",
    "ios": {
      "simulator": true
    },
    "android": {
      "buildType": "apk"
    },
    "env": {
      "APP_ENV": "preview"
    }
  }
}
  • Internal distribution
  • iOS simulator builds for testing
  • Android APK for easy distribution
  • Uses preview environment variables

Production Profile

For app store releases:
{
  "production": {
    "android": {
      "buildType": "app-bundle"
    },
    "env": {
      "APP_ENV": "production"
    }
  }
}
  • Android App Bundle (AAB) for Play Store
  • Production environment variables
  • Optimized for store submission

Building with EAS

The starter includes Nx-integrated build commands for convenience.

Development Build

Build a development client:
# From repository root
bun run build:development

# Or directly with EAS
cd apps/mobile
eas build --profile development --platform all

Preview Build

Build a preview version:
bun run build:preview

# Or with EAS
cd apps/mobile
eas build --profile preview --platform all

Production Build

Build for app stores:
bun run build:production

# Or with EAS
cd apps/mobile
eas build --profile production --platform all

Platform-Specific Builds

Build for a specific platform:
# iOS only
eas build --profile production --platform ios

# Android only
eas build --profile production --platform android

Submitting to App Stores

After building with the production profile, submit to stores:
bun run submit:production

# Or with EAS
cd apps/mobile
eas submit --platform all
Follow the prompts to:
  • Select the build to submit
  • Provide App Store Connect / Google Play credentials
  • Configure submission settings

Environment Variables in EAS

EAS supports environment variables in builds through multiple methods:

1. Build Profile Environment Variables

Define in eas.json:
{
  "production": {
    "env": {
      "APP_ENV": "production",
      "API_URL": "https://api.example.com"
    }
  }
}

2. EAS Secrets

For sensitive values, use EAS Secrets:
# Create a secret
eas secret:create --scope project --name FIREBASE_API_KEY --value "your-key"

# List secrets
eas secret:list

# Delete a secret
eas secret:delete --name FIREBASE_API_KEY
Secrets are automatically available as environment variables during builds.

3. .env Files

Local .env files are not included in EAS builds by default. Use EAS Secrets instead.

Build Configuration

iOS Specific

For iOS builds, you may need to configure: App Store Connect API Key (recommended):
eas credentials
Or manual signing:
  • Provisioning profiles
  • Distribution certificates

Android Specific

For Android builds, configure: Keystore (for signing):
eas credentials
EAS can generate and manage keystores automatically.

Monitoring Builds

View Build Status

Check build progress:
eas build:list
Or visit the EAS dashboard to monitor builds in real-time.

Build Logs

View detailed logs:
eas build:view [BUILD_ID]

Common Build Commands

# List all builds
eas build:list

# View specific build
eas build:view [BUILD_ID]

# Cancel a build
eas build:cancel [BUILD_ID]

# Configure credentials
eas credentials

# View project info
eas project:info

# Configure webhooks
eas webhook:create

EAS Update (OTA Updates)

Configure over-the-air updates for quick fixes:

1. Configure Update Channel

In eas.json, add update channels:
{
  "production": {
    "channel": "production"
  },
  "preview": {
    "channel": "preview"
  }
}

2. Publish an Update

eas update --branch production --message "Bug fixes"

3. View Updates

eas update:list

Troubleshooting

Build Fails with Missing Dependencies

Ensure eas-build-post-install script runs correctly. Check apps/mobile/package.json:
{
  "scripts": {
    "eas-build-post-install": "cd ../../ && node tools/scripts/eas-build-post-install.mjs . apps/mobile"
  }
}

iOS Signing Issues

Run credentials configuration:
eas credentials

Android Build Fails

Check that your package name is unique and valid:
  • No uppercase letters
  • Reverse domain notation
  • Matches app.json configuration

Environment Variables Not Available

Ensure variables are:
  1. Defined in eas.json env block, OR
  2. Created as EAS Secrets, OR
  3. Have EXPO_PUBLIC_ prefix for client-side access

Best Practices

  1. Use EAS Secrets for sensitive values (API keys, tokens)
  2. Test preview builds before production releases
  3. Version your builds consistently
  4. Monitor build logs for warnings
  5. Use channels for staged rollouts with EAS Update
  6. Automate submissions with CI/CD pipelines

Official Documentation

Next Steps