# Deploy

## Build your project for app stores

Learn how to create a production build for your app that is ready to be submitted to app stores from the command line using EAS Build.

Whether you have built a native app binary using [EAS](/build/setup/) or [locally](/guides/local-app-development/), the next step in your app development journey is to submit your app to the stores. To do so, you need to create a **production build**.
Production builds are submitted to app stores for release to the general public or as part of a store-facilitated testing process such as TestFlight. This guide explains how to create production builds with [EAS](#production-builds-using-eas) and [locally](#production-builds-locally). It is also possible to create production builds for Expo apps with any CI service capable of compiling Android and iOS apps.
## Production builds using EAS
Production builds must be installed through their respective app stores. You cannot install them directly on your Android Emulator, iOS Emulator, or device. The only exception to this is if you explicitly set `"buildType": "apk"` for Android on your build profile. However, it is recommended to use **aab** when submitting to stores, and this is the default configuration.
### `eas.json` configuration
A minimal configuration for building a production build in **eas.json** is already created when you create your first build:
```json eas.json
{
  "build": {
    "production": {}
  }
}
```
### Create a production build
To create a production build, run the following command for a platform:
    ```sh
$ eas build --platform android
```
    ```sh
$ eas build --platform ios
```
You can attach a message to the build by passing `--message` to the build command, for example, `eas build --platform ios --message "Some message"`. The message will appear on the EAS dashboard. It comes in handy when you want to specify the purpose of the build for your team.
Alternatively, you can use `--platform all` option to build for Android and iOS at the same time:
```sh
$ eas build --platform all
```
## Developer account
You will need to have a developer account for the app store you want to submit your app.
Note: Google Play Developer membership is required to distribute to the Google Play Store.
---
You can build and sign your app using EAS Build, but you can't upload it to the Google Play Store unless you have a membership, a one-time $25 USD fee.
---
Note: Apple Developer Program membership is required to build for the Apple App Store.
---
If you are going to use EAS Build to create production builds for the Apple App Store, you need access to an account with a $99 USD [Apple Developer Program](https://developer.apple.com/programs) membership.
---
## App signing credentials
Before the build process can start for app stores, you need a store developer account and generate or provide app signing credentials.
Whether you have experience with generating app signing credentials or not, EAS CLI can do the heavy lifting. You can opt-in for EAS CLI to handle the app signing credentials process.
### Android app signing credentials
- If you have not yet generated a keystore for your app, use EAS CLI by selecting `Generate new keystore`, and then you are done. The keystore is stored securely on EAS servers.
- If you want to manually generate your keystore, see the [manual Android credentials guide](/app-signing/local-credentials#android-credentials) for more information.
### iOS app signing credentials
- If you have not generated a provisioning profile and/or distribution certificate yet, use EAS CLI by signing in to your Apple Developer Program account and following the prompts.
- If you want to manually generate your credentials, see the [manual iOS credentials guide](/app-signing/local-credentials#ios-credentials) for more information.
## Wait for the build to complete
By default, the `eas build` command will wait for your build to complete, but you can interrupt it if you prefer not to wait. Instead, use the builds details page link prompted by EAS CLI to monitor the build progress and read the build logs. You can also find this page by visiting [your build dashboard](https://expo.dev/builds) or running the following command:
```sh
$ eas build:list
```
If you are a member of an organization and your build is on its behalf, you will find the build details on [the build dashboard for that account](https://expo.dev/accounts/[account]/builds).
## Create builds automatically
You can automatically create builds on commits to specific branches with [EAS Workflows](/eas/workflows/get-started/). First, you'll need to [configure your project](/eas/workflows/get-started/#configure-your-project), add a file named **.eas/workflows/create-builds.yml** at the root of your project, then add the following workflow configuration:
```yaml .eas/workflows/create-builds.yml
name: Create builds
on:
  push:
    branches: ['main']
jobs:
  build_android:
    name: Build Android app
    type: build
    params:
      platform: android
      profile: production
  build_ios:
    name: Build iOS app
    type: build
    params:
      platform: ios
      profile: production
```
The workflow above will create Android and iOS builds on every commit to your project's `main` branch. You can also run this workflow manually with the following EAS CLI command:
```sh
$ eas workflow:run create-builds.yml
```
Learn more about common patterns with the [workflows examples guide](/eas/workflows/examples).
## Release builds locally
To create a release (also known as production) build locally, see the following React Native guides for more information on the necessary steps for Android and iOS.
These guides assume your project has **android** and/or **ios** directories containing the respective native projects. If you use [Continuous Native Generation](/workflow/continuous-native-generation) then you will need to run [prebuild](/workflow/prebuild) to generate the directories before following the guides.
> **Note**: Following the guide below, in step four, when you build the release **.aab** for Android, run `./gradlew app:bundleRelease` from the **android** directory instead of `npx react-native build-android --mode=release`.
## Next step


## Submit to app stores

Learn how to submit your app to Google Play Store and Apple App Store from the command line with EAS Submit.

**EAS Submit** is a hosted service that allows uploading and submitting app binaries to the app stores using EAS CLI. This guide describes how to submit your app to the Google Play Store and Apple App Store using EAS Submit.
Video Tutorial: [How to quickly publish to the App Store & Play Store with EAS Submit](https://www.youtube.com/watch?v=-KZjr576tuE)
## Apple App Store
<Prerequisites numberOfRequirements={4}>
  <Requirement number={1} title="Sign up for an Apple Developer account">
    An Apple Developer account is required to submit your app to the Apple App Store. You can sign up for an Apple Developer account on the [Apple Developer Portal](https://developer.apple.com/account/).
  </Requirement>
  <Requirement number={2} title="Include a bundle identifier in app.json">
    Include your app's bundle identifier in **app.json**:
    ```json app.json
    {
      "ios": {
        "bundleIdentifier": "com.yourcompany.yourapp"
      }
    }
    ```
  </Requirement>
  <Requirement number={3} title="Install EAS CLI and authenticate with your Expo account">
    Install EAS CLI and login with your Expo account:
    ```sh
$ npm install -g eas-cli && eas login
```
  </Requirement>
  <Requirement number={4} title="Build a production app">
    You'll need a production build ready for store submission. You can create one using [EAS Build](/build/introduction/):
    ```sh
$ eas build --platform ios --profile production
```
    Alternatively, you can build the app on your own computer with `eas build --platform ios --profile production --local` or with Xcode.
  </Requirement>
</Prerequisites>
Once you have completed all the prerequisites, you can start the submission process.
Run the following command to submit a build to the Apple App Store:
```sh
$ eas submit --platform ios
```
The command will lead you step by step through the process of submitting the app.
## Google Play Store
<Prerequisites numberOfRequirements={7}>
  <Requirement number={1} title="Sign up for a Google Play Developer account">
    A Google Play Developer account is required to submit your app to the Google Play Store. You can sign up for a Google Play Developer account on the [Google Play Console sign-up page](https://play.google.com/apps/publish/signup/).
  </Requirement>
  <Requirement number={2} title="Create a Google Service Account">
    EAS requires you to upload and configure a Google Service Account Key to submit your Android app to the Google Play Store. You can create one with the [uploading a Google Service Account Key for Play Store submissions with EAS](https://github.com/expo/fyi/blob/main/creating-google-service-account.md) guide.
  </Requirement>
  <Requirement number={3} title="Create an app on Google Play Console">
    Create an app by clicking **Create app** in the [Google Play Console](https://play.google.com/apps/publish/).
  </Requirement>
  <Requirement number={4} title="Install EAS CLI and authenticate with your Expo account">
    Install EAS CLI and login with your Expo account:
    ```sh
$ npm install -g eas-cli && eas login
```
  </Requirement>
  <Requirement number={5} title="Include a package name in app.json">
    Include your app's package name in **app.json**:
    ```json app.json
    {
      "android": {
        "package": "com.yourcompany.yourapp"
      }
    }
    ```
  </Requirement>
  <Requirement number={6} title="Build a production app">
    You'll need a production build ready for store submission. You can create one using [EAS Build](/build/introduction/):
    ```sh
$ eas build --platform android --profile production
```
    Alternatively, you can build the app on your own computer with `eas build --platform android --profile production --local` or with Android Studio.
  </Requirement>
  <Requirement number={7} title="Upload your app manually at least once">
    You have to upload your app manually at least once. This is a limitation of the Google Play Store API.
    Learn how with the [first submission of an Android app](https://expo.fyi/first-android-submission) guide.
  </Requirement>
</Prerequisites>
Once you have completed all the prerequisites, you can start the submission process.
Run the following command to submit a build to the Google Play Store:
```sh
$ eas submit --platform android
```
The command will lead you step by step through the process of submitting the app.
## Build and submit automatically
You can automatically create builds and submit them to the app stores with [EAS Workflows](/eas/workflows/get-started/). First, you'll need to [configure your project](/eas/workflows/get-started/#configure-your-project), add a file named **.eas/workflows/build-and-submit.yml** at the root of your project, then add the following workflow configuration:
```yaml .eas/workflows/build-and-submit.yml
name: Build and submit
on:
  push:
    branches: ['main']
jobs:
  build_android:
    name: Build Android app
    type: build
    params:
      platform: android
      profile: production
  build_ios:
    name: Build iOS app
    type: build
    params:
      platform: ios
      profile: production
  submit_android:
    name: Submit Android
    type: submit
    needs: [build_android]
    params:
      build_id: ${{ needs.build_android.outputs.build_id }}
  submit_ios:
    name: Submit iOS
    type: submit
    needs: [build_ios]
    params:
      build_id: ${{ needs.build_ios.outputs.build_id }}
```
The workflow above will create Android and iOS builds on every commit to your project's `main` branch, then submit them to the Google Play and Apple App Store respectively. You can also run this workflow manually with the following EAS CLI command:
```sh
$ eas workflow:run build-and-submit.yml
```
Learn more about common patterns with the [workflows examples guide](/eas/workflows/examples).
## Manual submission to app stores
You can also submit your app manually to the Google Play Store and Apple App Store.
## Next step


## App stores metadata

A brief overview of how to use EAS Metadata to automate and maintain your app store presence.

> **important** **EAS Metadata** is in beta and subject to breaking changes.
When submitting your app to app stores, you need to provide metadata. This process is lengthy and is often about complex topics that don't apply to your app. After the information you provide gets reviewed and if there is any issue with it, you need to restart this process.
[**EAS Metadata**](/eas/metadata/) enables you to automate and maintain this information from the command line instead of going through multiple forms in the app store dashboards. It can also instantly identify well-known app store restrictions that could trigger a rejection after a lengthy review queue. This guide shows how to use EAS Metadata to automate and maintain your app store presence.
## Prerequisites
EAS Metadata currently **only supports the Apple App Store**.
> Using VS Code? Install the [Expo Tools extension](https://github.com/expo/vscode-expo#readme) for auto-complete, suggestions, and warnings in your **store.config.json** files.
## Create a store config
EAS Metadata uses [store.config.json](/eas/metadata/config/) file to hold all the information you want to upload to the app stores. This file is located at the root of your Expo project.
Create a new **store.config.json** file at the root of your project directory as shown in the example below:
```json store.config.json
{
  "configVersion": 0,
  "apple": {
    "info": {
      "en-US": {
        "title": "Awesome App",
        "subtitle": "Your self-made awesome app",
        "description": "The most awesome app you have ever seen",
        "keywords": ["awesome", "app"],
        "marketingUrl": "https://example.com/en/promo",
        "supportUrl": "https://example.com/en/support",
        "privacyPolicyUrl": "https://example.com/en/privacy"
      }
    }
  }
}
```
The above example file contains JSON schema. Replace the example values with your own. It is usually contains your app's `title`, `subtitle` , `description`, `keywords`, and `marketingUrl` and so on.
**An important thing to remember from the above example is the `configVersion` property.** It helps with versioning changes that are not backward compatible.
> For more information on properties that can be defined in **store.config.json**, see [Schema for EAS Metadata](/eas/metadata/schema/#config-schema).
## Upload the store config
> Before pushing the **store.config.json** to the app stores, you must upload a new binary of your app. See [App Store submissions](/deploy/submit-to-app-stores/) for more information. After the binary is submitted and processed, you can continue with the step below.
After you have created the **store.config.json** file and added the necessary information related to your app, you can push the store config to the app stores by running the command:
```sh
$ eas metadata:push
```
If EAS Metadata runs into any issues with your store config, it will warn you when running this command. When there are no errors, or you confirm to push it with possible issues, it will try to upload as much as possible.
You can also re-use this command when you modify the **store.config.json** file and want to push the latest changes to the app stores.
## Next steps


## Send over-the-air updates

Learn how to send over-the-air updates to push critical bug fixes and improvements to your users.

You can send over-the-air updates containing critical bug fixes and improvements to your users.
## Get started
> If you've published [previews](/review/share-previews-with-your-team/) or created a [build](/deploy/build-project/) before, you may have already set up updates and can skip this section.
To set up updates, run the following [EAS CLI](/develop/tools/#eas-cli) command:
```sh
$ eas update:configure
```
After the command completes, you'll need to make new builds before continuing to the next section.
## Send an update
To send an update, run the following [EAS CLI](/develop/tools/#eas-cli) command:
```sh
$ eas update --channel production
```
This command will create an update and make it available to builds of your app that are configured to receive updates on the `production` channel. This channel is defined in [**eas.json**](/eas/json/#channel).
You can verify the update works by force closing the app and reopening it two times. The update should be applied on the second launch.
## Send updates automatically
You can automatically send updates with [EAS Workflows](/eas/workflows/get-started/). First, you'll need to [configure your project](/eas/workflows/get-started/#configure-your-project), add a file named **.eas/workflows/send-updates.yml** at the root of your project, then add the following workflow configuration:
```yaml .eas/workflows/send-updates.yml
name: Send updates
on:
  push:
    branches: ['main']
jobs:
  send_updates:
    name: Send updates
    type: update
    params:
      channel: production
```
The workflow above will send an over-the-air update for the `production` update channel on every commit to your project's `main` branch. You can also run this workflow manually with the following EAS CLI command:
```sh
$ eas workflow:run send-updates.yml
```
Learn more about common patterns with the [workflows examples guide](/eas/workflows/examples).
## Learn more
You can learn how to [rollout an update](/eas-update/rollouts/), [optimize assets](/eas-update/optimize-assets/), and more with our [update guides](/eas-update/introduction/).


## Publish your web app

Learn how to deploy your web app using EAS Hosting.

If you are building a universal app, you can quickly deploy your web app using [EAS Hosting](/eas/hosting/introduction/). It is a service for deploying web apps built with Expo Router and React.
## Prerequisites
Before you begin, in your project's **app.json** file, ensure that the [`expo.web.output`](/versions/latest/config/app/#output) property is either `static` or `server`.
## Export your web project
To deploy your web app, you need to create a static build of your web project. Export your web project into a **dist** directory by running the following command:
```sh
$ npx expo export --platform web
```
> Remember to re-run this command every time before deploying when you make changes to your web app.
## Initial deployment
To publish your web app, run the following [EAS CLI](/develop/tools/#eas-cli) command:
```sh
$ eas deploy
```
After running this command for the first time, you'll be prompted to select a preview subdomain for your project. This subdomain is a prefix used to create a preview URL and is used for production deployments. For example, in `https://test-app--1234.expo.app`, `test-app` is the preview subdomain.
Once your deployment is complete, the EAS CLI will output a preview URL to access your deployed app.
## Production deployment
To create a production deployment, run the following [EAS CLI](/develop/tools/#eas-cli) command:
```sh
$ eas deploy --prod
```
Once your deployment is complete, the EAS CLI will output a production URL to access your deployed app.
## Deploy automatically
You can automatically deploy your app to the web with [EAS Workflows](/eas/workflows/get-started/). First, you'll need to [configure your project](/eas/workflows/get-started/#configure-your-project), add a file named **.eas/workflows/deploy-web.yml** at the root of your project, then add the following workflow configuration:
```yaml .eas/workflows/deploy-web.yml
name: Deploy web
on:
  push:
    branches: ['main']
jobs:
  deploy_web:
    name: Deploy web
    type: deploy
    params:
      prod: true
```
The workflow above will create a web deployment on every commit to your project's `main` branch. You can also run this workflow manually with the following EAS CLI command:
```sh
$ eas workflow:run deploy-web.yml
```
Learn more about common patterns with the [workflows examples guide](/eas/workflows/examples).
## Learn more
You can learn more about setting up [deployment aliases](/eas/hosting/deployments-and-aliases/), using a [custom domain](/eas/hosting/custom-domain/), or [deploying an API Route](/router/web/api-routes/#deployment).