Compile locally: Overview

Edit

An overview on local app compilation process for your Expo apps.


You can leverage your local development environment to compile your app locally by utilizing Android Studio and Xcode. This compilation process can be done for both debug and release builds. This page provides an overview of the local app compilation process and references to other guides that might be necessary in this workflow.

When to compile your app locally

There are different scenarios when you want to compile your app on your developer machine. It includes:

  • You want to iterate quickly on native code changes or test platform-specific changes in your debug build
  • You want to manually generate native code to test your debug build
  • Any scenario where you are required to create builds inside an environment where access to a network is restricted
  • You want to locally manage your own credentials (such as upload key, and so on)
  • You want to test or integrate your own custom build cache provider
  • You want to opt out of prebuilt Expo Modules for Android and compile them from source locally once

Note: Compiling your app locally complements EAS Build. You can keep using the build service for cloud automation and fall back to local builds for development.

Prerequisites

You need to install and set up Android Studio and Xcode to compile and run Android and iOS projects on your local machine. See the following guides on how to set up these tools:

Compiling your debug build

To quickly build and iterate on a debug build, you can use Expo CLI's npx expo run:[android|ios] commands. These commands compile your project, using your locally installed Android SDK or Xcode, into a debug build of your app.

Local app development

Learn how to compile and build your Expo app locally.

Compiling your release build

To create a release build (also known as production build) of your app, you generate signing credentials by utilizing tools provided by Android Studio and Xcode. Then, you can generate a release build and follow the process of manually submitting your app to Google Play Store or Apple App Store.

Create a production build locally

Generate signed Android App Bundles, archive iOS builds in Xcode, and submit them manually.

Reuse previous builds from a provider

You can accelerate your local development by caching and reusing builds from a provider. You can use EAS as a build provider or create your own custom provider.

Use build cache providers

Enable EAS build caching or ship a custom provider to shorten local build times.

Prebuilt Expo Modules for Android

SDK 53 and later ship with prebuilt Expo Modules for Android that reduce the work Gradle performs on each build. You can continue using the defaults or selectively opt out when you need to modify a module's source code.

Prebuilt Expo Modules for Android

Understand how prebuilt modules work and learn how to opt out globally or per package.