React Native course Β· Module 12: Publishing the app

EAS Build - Building the app

1 min read Β·
In this lesson4

EAS (Expo Application Services) is the official tool for building and publishing Expo apps.

Installing EAS CLI

npm install -g eas-cli
eas login

eas.json configuration

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

Building

# Development build (with expo-dev-client)
eas build --profile development --platform ios
eas build --profile development --platform android

# Preview (for testing)
eas build --profile preview --platform all

# Production
eas build --profile production --platform all

Local build

# Requires Xcode/Android Studio
eas build --local --platform android
eas build --local --platform ios
Code for this lesson: eas.json
// File: eas.json - EAS build profiles configuration
{
  "cli": {
    "version": ">= 5.0.0"
  },
  "build": {
    // TODO: add a "development" profile with "developmentClient": true
    //       and "distribution": "internal" (build with expo-dev-client)

    // TODO: add a "preview" profile with "distribution": "internal"
    //       and android.buildType "apk" (for internal testing)

    // TODO: add a "production" profile with "autoIncrement": true

  },
  "submit": {
    "production": {}
  }
}

Spotted a mistake in this lesson?

Check yourself

Answer the questions from this lesson. Pick an answer to see right away whether it is correct.

  1. 1. How do you install EAS CLI globally?

  2. 2. Which profile creates a build with expo-dev-client?

These are 2 of 3 questions for this lesson. Solve the rest in the game.

Hands-on tasks in the game

  • Horizontal ordering

    Arrange the build command:

  • Vertical ordering

    Arrange the eas.json structure:

  • Code editor

    Complete eas.json with profiles.

  1. QuestionEAS CLI install
  2. Put in ordereas build command
  3. QuestionBuild profiles
  4. Questionpreview vs production
  5. Put in ordereas.json profiles
  6. Coding taskeas.json

Useful articles