Build App
Now you are all set to build your app, follow the steps below to build your app.
Video Tutorial
Instructions
Getting Started
- 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
- register new app by running following command (this is for first time only)
eas init
- Follow the on screen instructions, if asked to run "expo doctor" or "expo updates" ignore it.
Build For Android
- Open terminal in VS Code
- 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
- Now wait for the build to complete (this may take upto 12 minutes once started)
- 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
- Install the build on your android phone/emulator
- Start the development server using:
npx expo start --dev-client -c
- 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
- Now goto your expo account
- Goto Dashboard
- Select your newly created App
- On the right Navigation Under "Project Settings" Choose "Credentials"
- Under "Android" click your package name
- Under "FCM V1 service account key" Create New Key
- Choose "Upload a New Key" or "Upload an Existing Key" if you already have one uploaded to expo.
- Goto Your Firebase > Project Settings > Cloud Messaging
- Click on Manage service accounts and generate a new service account key.
- Add the newly generated key to expo.
Build for iOS (Beta)
- Download AppLovinQualityServiceSetup-ios.rb (opens in a new tab) (Make sure your Applovin is logged in)
- Copy the downloaded file to "plugins/" folder (make sure to use same file name):
- AppLovinQualityServiceSetup-ios.rb
- Ignore the Step 1 and 2 if you are not using Applovin.
- Open terminal in VS Code
- 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.
- Follow the instructions shown in terminal
- You may be asked to provide your apple developer account credentials for signing the app
- 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