This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

Create a release build locally

Edit page

Learn how to create a release (production) build for your Expo app locally.


To create your app's release build (also known as production build) locally, you need to follow separate steps on your computer and use the tools required to create any native app. This guide provides the necessary steps for Android and iOS.

Android

Creating a release build locally for Android requires signing it with an upload key and generating an Android Application Bundle (.aab). Follow the steps below:

Prerequisites

2 requirements

1.

OpenJDK installed

Install an OpenJDK distribution to access the keytool command.

2.

android directory generated

If you are using Continuous Native Generation (CNG), run npx expo prebuild to generate it.

1

Create an upload key

Already created a build with EAS Build? Download your credentials and skip to the next step.

If you've already created a build with EAS Build, follow the steps below to download the credentials, which contains the upload key and its password, key alias, and key password:

  1. In your terminal, run eas credentials -p android and select the build profile.
  2. Select credentials.json > Download credentials from EAS to credentials.json.
  3. Move the downloaded keystore.jks file to the android/app directory.
  4. Copy the values for the upload keystore password, key alias, and key password from the credentials.json as you will need them in the next step.

Inside your Expo project directory, run the following keytool command to create an upload key:

Terminal
sudo keytool -genkey -v -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000

After running this command, you will be prompted to enter a password for the keystore. This password will protect the upload key. Remember the password you enter here, as you'll need it in the next step.

This command also generates the keystore file named my-upload-key.keystore in your project directory. Move it to the android/app directory.

2

Update gradle variables

Open android/gradle.properties file and add the following gradle variables at the end of the file. Replace the ***** with the correct keystore and key password that you provided in the previous step.

These variables contain information about your upload key:

android/gradle.properties
# If you've downloaded the credentials from `eas credentials` command, see comments below for each value. # Path to the "keystore" file MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore # Replace with value of the `keystore.keyAlias` field in the credentials.json file MYAPP_UPLOAD_KEY_ALIAS=my-key-alias # Replace with value of the `keystore.password` field in the credentials.json file MYAPP_UPLOAD_STORE_PASSWORD=***** # Replace with value of the `keystore.keyPassword` field in the credentials.json file MYAPP_UPLOAD_KEY_PASSWORD=*****

3

Add signing config to build.gradle

Open android/app/build.gradle file and add the following configuration:

4

Generate release Android Application Bundle (aab)

Navigate inside the android directory and create a release build in .aab format by running Gradle's bundleRelease command:

Terminal
cd android

./gradlew app:bundleRelease

This command will generate app-release.aab inside the android/app/build/outputs/bundle/release directory.

5

App submission to Google Play Console

To submit the .aab file, upload it manually through Google Play Console. Alternatively, EAS Submit accepts locally built binaries with eas submit --platform android --path ./my-app.aab.

Manual submission of an Android app

Follow the step-by-step guide on manually submitting your app to Google Play Store for the first time.

iOS

To create an iOS release build locally, you use Xcode, which handles signing and uploading to App Store Connect. Follow the manual submission guide for the complete walkthrough, from configuring a release scheme to archiving and uploading your app:

Manually submit an iOS app with Xcode

Configure signing, archive your app with Xcode, and upload it to App Store Connect.