Build App

Now you are all set to build your app, follow the steps below to build your app.

Video Tutorial


Instructions

Getting Started

  1. Open terminal and run the following command to login your eas account
eas login
ℹ️

If you face "eas.ps1 cannot be used because running scripts is disabled on this system" error on windows, Open your windows PowerShell as administrator and run the command below. After running the command close all terminal windows and try "eas login" again

Set-ExecutionPolicy RemoteSigned
  1. register new app by running following command (this is for first time only)
eas init
  1. Follow the on screen instructions, if asked to run "expo doctor" or "expo updates" ignore it.

Build For Android

  1. Open terminal in VS Code
  2. Run the Following Command

Production

eas build --profile production --platform android

After running the above command follow the instructions as shown in video.

 Would you like to create a project?: y
 Generate a new Android Keystore?: y
  1. Now wait for the build to complete (this may take upto 12 minutes once started)
  2. After the build is completed you can download the file and upload it to Play Store

Development

For testing and screenshots, generate a development build

eas build --profile development --platform android

Running the Development Build

After you have geneated the development build follow the instructions below to run it on Android

  1. Install the build on your android phone/emulator
  2. Start the development server using:
npx expo start --dev-client -c
  1. Open your app and tap "fetch development server"
    • If you don't see a server,
    • download "Expo GO" from PlayStore.
    • Scan the QR Code from your Terminal
    • This should start your app

Android Notifications Setup


Follow these Additional Steps to enable notifications for Android

  1. Now goto your expo account
  2. Goto Dashboard
  3. Select your newly created App
  4. On the right Navigation Under "Project Settings" Choose "Credentials"
  5. Under "Android" click your package name
  6. Under "FCM V1 service account key" Create New Key
  7. Choose "Upload a New Key" or "Upload an Existing Key" if you already have one uploaded to expo.
  8. Goto Your Firebase > Project Settings > Cloud Messaging
  9. Click on Manage service accounts and generate a new service account key.
  10. Add the newly generated key to expo.

Build for iOS (Beta)

  1. Download AppLovinQualityServiceSetup-ios.rb (opens in a new tab) (Make sure your Applovin is logged in)
  2. Copy the downloaded file to "plugins/" folder (make sure to use same file name):
    • AppLovinQualityServiceSetup-ios.rb
    1. Ignore the Step 1 and 2 if you are not using Applovin.
    2. Open terminal in VS Code
    3. Run the Following Command

    Production

    eas build --profile production --platform ios
    ℹ️

    iOS is still in Beta, (EAS) cloud build are experimental and you may face errors. We are working on it to make it stable. if possible please use macOS to build your app locally.

    1. Follow the instructions shown in terminal
    2. You may be asked to provide your apple developer account credentials for signing the app
    3. Choose yes and provide the credentials at this step.

    Development

    For testing and screenshots, generate a development build (you need MacOS for this)

    eas build --profile staging --platform android

    Building app Locally

    ⚠️

    Building locally is not recommended for Android as you may encounter bugs.

    If you don't want to use expo and eas to build your app, you can build your app locally on your own system. To do this you will need following dependencies:

    • For Android
      • SDK 13 Supported Android Studio
      • JDK 1.8
    • For iOS
      • XCode
      • iOS 15.4 or higher
      • 12 GB of Free Storage Space
    ℹ️

    Even though you are not using eas, you will still need to setup eas.

    Build the App

    add the --local flag to eas build for any command you want to run locally.

    iOS
    eas build --profile production --platform ios --local
    Android
    eas build --profile production --platform android --local