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:
2 requirements
2 requirements
1.
Install an OpenJDK
distribution
to access the keytool command.
2.
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:
- In your terminal, run
eas credentials -p androidand select the build profile. - Select credentials.json > Download credentials from EAS to credentials.json.
- Move the downloaded keystore.jks file to the android/app directory.
- 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:
- sudo keytool -genkey -v -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000After 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.
If you commit the android directory to a version control system like Git, don't commit this keystore file. It contains your upload key and should be kept private.
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:
# 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=*****
If you commit the android directory to a version control system like Git, don't commit the above information. Instead, create a ~/.gradle/gradle.properties file on your computer and add the above variables to this file.
3
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:
- cd android- ./gradlew app:bundleReleaseThis 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.
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:
Configure signing, archive your app with Xcode, and upload it to App Store Connect.