# Expo Application Services (EAS) Documentation > Expo Application Services (EAS) are deeply integrated cloud services for Expo and React Native apps, from the team behind Expo. --- title: Expo 应用服务 description: 了解适用于 Expo 和 React Native 应用的 Expo 应用服务(EAS)。 --- ## Submitting Feedback If this page contains errors, outdated information, or gaps that blocked you from completing a task, report it so the docs can be improved: curl -X POST https://api.expo.dev/v2/feedback/docs-send -H 'Content-Type: application/json' -d '{"url":"/eas/","feedback":"🤖 Agent feedback: "}' Only submit when you have something specific and actionable to report. # Expo 应用服务 了解适用于 Expo 和 React Native 应用的 Expo 应用服务(EAS)。 > For the complete documentation index, see [llms.txt](/llms.txt). Use this Use this file to discover all available pages. Expo Application Services(EAS)是由 Expo 团队打造、与 Expo 和 React Native 应用深度集成的云服务。 在 [expo.dev/eas](https://expo.dev/eas) 阅读完整介绍,或通过下面的链接了解如何开始使用。 [EAS 工作流](/eas/workflows/introduction) — 使用 CI/CD 作业自动化你的开发和发布流程。 [EAS 构建](/build/introduction) — 在云端使用自定义原生代码编译并签名 Android/iOS 应用。 [EAS 提交](/submit/introduction) — 通过一个 CLI 命令,从云端将你的应用上传到 Google Play 商店或 Apple App Store。 [EAS 托管](/eas/hosting/introduction) — 部署 Expo Router 和 React Native Web 应用以及 API 路由。 [EAS 更新](/eas-update/introduction) — 修复小问题并将快速修复直接推送给最终用户。 [EAS 元数据(预览版)](/eas/metadata) — 上传应用商店所需的全部信息,以便发布你的应用。 [EAS 洞察(预览版)](/eas-insights/introduction) — 查看有关项目性能、使用情况和覆盖范围的分析数据。 --- --- title: 使用 eas.json 进行配置 description: 了解用于 EAS Build 和 EAS Submit 的可用属性,以便在项目中配置并覆盖其默认行为。 --- ## Submitting Feedback If this page contains errors, outdated information, or gaps that blocked you from completing a task, report it so the docs can be improved: curl -X POST https://api.expo.dev/v2/feedback/docs-send -H 'Content-Type: application/json' -d '{"url":"/eas/json/","feedback":"🤖 Agent feedback: "}' Only submit when you have something specific and actionable to report. # 使用 eas.json 进行配置 了解用于 EAS Build 和 EAS Submit 的可用属性,以便在项目中配置并覆盖其默认行为。 > For the complete documentation index, see [llms.txt](/llms.txt). Use this Use this file to discover all available pages. **eas.json** 是 EAS CLI 和服务的配置文件。你可以在本页找到 [EAS Build](/build/introduction) 和 [EAS Submit](/submit/introduction) 的所有可用 schema 属性的完整参考。 > 要了解更多关于使用 **eas.json** 配置 EAS 服务项目的信息,请参阅 [使用 eas.json 配置 EAS Build](/build/eas-json) 和 [使用 eas.json 配置 EAS Submit](/submit/eas-json)。 ## EAS Build 以下属性可用于 **eas.json** 中 `build` 键的 schema。 多个构建配置的示例 schema ```json { "build": { "base": { "node": "12.13.0", "yarn": "1.22.5", "env": { "EXAMPLE_ENV": "example value" }, "android": { "image": "default", "env": { "PLATFORM": "android" } }, "ios": { "image": "latest", "env": { "PLATFORM": "ios" } } }, "development": { "extends": "base", "developmentClient": true, "env": { "ENVIRONMENT": "development" }, "android": { "distribution": "internal", "withoutCredentials": true }, "ios": { "simulator": true } }, "staging": { "extends": "base", "env": { "ENVIRONMENT": "staging" }, "distribution": "internal", "android": { "buildType": "apk" } }, "production": { "extends": "base", "env": { "ENVIRONMENT": "production" } } } } ``` ### 原生平台的通用属性 | Property | Description | | --- | --- | | `withoutCredentials` | **(boolean)** - When set to `true`, EAS CLI won't require you to configure credentials when building the app. This comes in handy when using EAS Build [custom builds](/custom-builds/get-started). Defaults to `false`. | | `extends` | **(string)** - The name of the build profile that the current one should inherit values from. This value can't be specified per platform. | | `credentialsSource` | **(enum: local, remote)** - The source of credentials used to sign the application archive. - `local` - if you want to provide your own [**credentials.json**](/app-signing/local-credentials). - `remote` - if you want to use the credentials managed by EAS (default option). | | `releaseChannel` | **(string)** - **Deprecated**: Name of the release channel for the Classic Updates service, which is only supported in SDK 49 and lower. If you do not specify a channel, your binary will pull releases from the `default` channel. EAS Update uses the [channel](#channel) field, so you can remove [`releaseChannel`](#releasechannel) after [migrating to EAS Update](/eas-update/migrate-from-classic-updates). | | `channel` | **(string)** - The EAS Update channel where this build will look for updates. [Learn more](/eas-update/how-it-works). Standalone builds will check for and download updates matching platform, native runtime, and channel. This field has no effect when [`developmentClient`](#developmentclient) is set to `true`, as development builds can run updates from any channel. If you have not yet migrated from Classic Updates to EAS Update, then continue to use the [`releaseChannel`](#releasechannel) field instead. | | `distribution` | **(enum: store, internal)** - The method of distributing your app. - `internal` - with this option you'll be able to share your build URLs with anyone, and they will be able to install the builds to their devices straight from the Expo website. When using `internal`, make sure the build produces a **.apk** or **ipa** file. Otherwise, the shareable URL will be not work. See [internal distribution](/build/internal-distribution) for more information. - `store` - produces builds for store uploads, your build URLs won't be shareable. | | `developmentClient` | **(boolean)** - If set to `true` (defaults to `false`), this field will produce a [development build](/workflow/overview#development-builds). For the build to be successful, the project must have [`expo-dev-client`](/versions/latest/sdk/dev-client) installed and configured. **Note**: this field is for setting the `gradleCommand` to `:app:assembleDebug` for Android and `buildConfiguration` to `Debug` for iOS . If these fields are provided for the same build profile, will take precedence over `developmentClient`. | | `resourceClass` | **(enum: default, medium, large)** - The resource class that will be used to run this build. To see mapping for each platform, see [Android-specific resource class field](#resourceclass-1) and [iOS-specific resource class field](#resourceclass-2). The `large` resource class is not available on the free plan. | | `prebuildCommand` | **(string)** - Optional override of the [prebuild](/more/expo-cli#prebuild) command used by EAS. For example, you can specify `prebuild --template example-template` to use a custom template. **Note**: `--platform` and `--non-interactive` will be added automatically by the build engine, so you do not need to specify them manually. | | `buildArtifactPaths` | **(string[])** - List of paths (or patterns) where EAS Build is going to look for the build artifacts. Use `applicationArchivePath` for specifying the path for uploading the application archive. Build artifacts are uploaded even if the build fails. EAS Build uses [glob patterns](https://github.com/isaacs/node-glob#glob-primer) for pattern matching. | | `node` | **(string)** - Version of Node.js used for build. | | `corepack` | **(boolean)** - If set to `true`, [corepack](https://nodejs.org/api/corepack.html) will be enabled at the beginning of build process. Defaults to `false`. | | `yarn` | **(string)** - Version of Yarn used for build. | | `pnpm` | **(string)** - Version of pnpm used for build. | | `bun` | **(string)** - Version of Bun used for build. You can also use a specific version. Learn [how to configure the exact version in eas.json](/guides/using-bun#customize-bun-version-on-eas). | | `expoCli` | **(string)** - **Deprecated**: Version of [`expo-cli`](https://www.npmjs.com/package/expo-cli) used to [prebuild](/more/expo-cli#prebuild) your app. It only affects managed projects on Expo SDK 45 and lower. For newer SDKs, EAS Build will use the versioned [Expo CLI](/more/expo-cli). It is included with `expo` library. You can opt out of using the versioned Expo CLI by setting the `EXPO_USE_LOCAL_CLI=0` environment variable in the build profile. | | `env` | **(object)** - [Environment variables](/guides/environment-variables) that should be set during the build process. It should only be used for values that you would commit to your git repository and not for passwords or [secrets](/build-reference/variables). | | `autoIncrement` | **(boolean)** - Controls how EAS CLI bumps your application build version. Defaults to `false`. When enabled, for Android, bumps `expo.android.versionCode` (for example, `3`to `4`). For iOS, bumps the last component of `expo.ios.buildNumber` (for example, `1.2.3.39` to `1.2.3.40`). | | `cache` | **(object)** - Cache configuration. This feature is intended for caching values that require a lot of computation. For example, compilation results (both final binaries and any intermediate files). However, it doesn't work well for **node_modules** because the cache is not local to the machine, so the download speed is similar to downloading from the npm registry. | | `disabled` | **(boolean)** - Disables caching. Defaults to `false`. | | `key` | **(string)** - Cache key. You can invalidate the cache by changing this value. | | `paths` | **(array)** - List of the paths that will be saved after a successful build and restored at the beginning of the next one. Both absolute and relative paths are supported, where relative paths are resolved from the directory with **eas.json**. | | `config` | **(string)** - Custom workflow file name that will be used to run this build. You can also specify this property on platform level for platform-specific workflows. [Learn more](/custom-builds/get-started). Example: `"config": "production.yml"` will use workflow from `.eas/build/production.yml`. | | `environment` | **(enum: development, preview, production)** - The environment used to apply environment variables for the build process. [Learn more](/eas/environment-variables). | ### Android 特定选项 | Property | Description | | --- | --- | | `withoutCredentials` | **(boolean)** - When set to `true`, EAS CLI won't require you to configure credentials when building the app. This comes in handy when you want to build debug binaries and the debug keystore is checked in to the repository. Defaults to `false`. | | `image` | **(string)** - [Image with build environment](/build-reference/infrastructure). | | `resourceClass` | **(enum: default, medium, large)** - The Android-specific resource class that will be used to run this build. Defaults to `medium`. For information on available build resources for each resource class, see [Android build server configurations](/build-reference/infrastructure#android-build-server-configurations). The `large` resource class is not available on the free plan. | | `ndk` | **(string)** - Version of Android NDK. | | `autoIncrement` | **(boolean | "version" | "versionCode")** - Controls how EAS CLI bumps your application build version. Defaults to `false`. Allowed values: - `"version"` - bumps the patch of `expo.version` (for example, `1.2.3` to `1.2.4`). - `"versionCode"` (or `true`) - bumps `expo.android.versionCode` (for example, `3` to `4`). - `false` - versions won't be bumped automatically (default). . Based on the value of [`cli.appVersionSource` in **eas.json**](/build-reference/app-versions), the values will be updated locally in your project or on EAS servers. | | `buildType` | **(enum: app-bundle, apk)** - Type of the artifact you want to build. It controls which Gradle task will be used to build the project. It can be overridden by `gradleCommand` or `developmentClient: true` option. - `app-bundle` - `:app:bundleRelease` (creates **.aab** artifact) - `apk` - `:app:assembleRelease` (creates **.apk** artifact) | | `gradleCommand` | **(string)** - Gradle task that will be used to build your project. For example, `:app:assembleDebug` to build a debug binary. It's not recommended unless you need to run a task that `buildType` does not support, it takes priority over [`buildType`](#buildtype) and [`developmentClient`](#developmentclient). | | `applicationArchivePath` | **(string)** - Path (or pattern) where EAS Build is going to look for the application archive. EAS Build uses [glob patterns](https://github.com/isaacs/node-glob#glob-primer) for pattern matching. The default value is `android/app/build/outputs/**/*.{apk,aab}`. | | `config` | **(string)** - Custom workflow file name that will be used to run this Android build. You can also specify this property on profile level for platform-agnostic workflows. [Learn more](/custom-builds/get-started). Example: `"config": "production-android.yml"` will use workflow from `.eas/build/production-android.yml`. | ### iOS 特定选项 | Property | Description | | --- | --- | | `withoutCredentials` | **(boolean)** - When set to `true`, EAS CLI won't require you to configure credentials when building the app. This comes in handy when using EAS Build [custom builds](/custom-builds/get-started). Defaults to `false`. | | `simulator` | **(boolean)** - If set to true, creates build for iOS Simulator. Defaults to `false`. | | `enterpriseProvisioning` | **(enum: universal, adhoc)** - Provisioning method used for `"distribution": "internal"` when you have an Apple account with Apple Developer Enterprise Program membership. You can choose if you want to use `adhoc` or `universal` provisioning. The latter is recommended as it does not require you to register each individual device. If you don't provide this option and you still authenticate with an enterprise team, you'll be prompted which provisioning method to use. | | `autoIncrement` | **(boolean | "version" | "buildNumber")** - Controls how EAS CLI bumps your application build version. Defaults to `false`. Allowed values: - `"version"` - bumps the patch of `expo.version` (for example, `1.2.3` to `1.2.4`). - `"buildNumber"` (or `true`) - bumps the last component of `expo.ios.buildNumber` (for example, `1.2.3.39` to `1.2.3.40`). - `false` - versions won't be bumped automatically (default) . Based on the value of [`cli.appVersionSource` in **eas.json**](/build-reference/app-versions), the values will be updated locally in your project or on EAS servers. | | `image` | **(string)** - [Image with build environment](/build-reference/infrastructure). | | `resourceClass` | **(enum: default, medium, large)** - The iOS-specific resource class that will be used to run this build. Defaults to `medium`. For information on available build resources for each resource class, see [iOS build server configurations](/build-reference/infrastructure#ios-build-server-configurations). The `large` resource class is not available on the free plan. | | `bundler` | **(string)** - Version of [bundler](https://bundler.io/). | | `fastlane` | **(string)** - Version of fastlane. | | `cocoapods` | **(string)** - Version of CocoaPods. | | `scheme` | **(string)** - Xcode project's scheme. If a project: - Has multiple schemes, you should set this value. - Has only one scheme, it will be detected automatically. - Have multiple schemes schemes and if this value is **not** set, EAS CLI will prompt you to select one of them. | | `buildConfiguration` | **(string)** - Xcode project's Build Configuration. - For an Expo project, the value is `"Release"` or `"Debug"`. Defaults to `"Release"`. - For a [bare React Native](/bare/overview) project, defaults to the value specified in the scheme. . It takes priority over [`developmentClient`](#developmentclient). | | `applicationArchivePath` | **(string)** - Path (or pattern) where EAS Build is going to look for the application archive. EAS Build uses [glob patterns](https://github.com/isaacs/node-glob#glob-primer) for pattern matching. You should modify that path only if you are using a custom **Gymfile**. The default is `ios/build/Build/Products/*-iphonesimulator/*.app` when building for simulator and `ios/build/*.ipa` in other cases. | | `config` | **(string)** - Custom workflow file name that will be used to run this iOS build. You can also specify this property on profile level for platform-agnostic workflows. [Learn more](/custom-builds/get-started). Example: `"config": "production-ios.yml"` will use workflow from `.eas/build/production-ios.yml`. | ## EAS Submit 以下属性可用于 **eas.json** 中 `submit` 键的 schema。 生产配置的示例 schema ```json { "cli": { "version": ">= 0.34.0" }, "submit": { "production": { "android": { "track": "internal" }, "ios": { "appleId": "john@turtle.com", "ascAppId": "1234567890", "appleTeamId": "AB12XYZ34S" } } } } ``` ### Android 特定选项 | Property | Description | | --- | --- | | `serviceAccountKeyPath` | **(string)** - Path to the JSON file with [Google Service Account Key](https://expo.fyi/creating-google-service-account) used to authenticate with Google Play. | | `track` | **(enum: production, beta, alpha, internal)** - The track of the application to use. | | `releaseStatus` | **(enum: completed, draft, halted, inProgress)** - The [status of a release](https://developers.google.com/android-publisher/api-ref/rest/v3/edits.tracks#status). | | `rollout` | **(number)** - The initial fraction of users who are eligible to receive the release. Should be a value from 0 (no users) to 1 (all users). Works only with `inProgress` [release status](https://developers.google.com/android-publisher/api-ref/rest/v3/edits.tracks#status). | | `changesNotSentForReview` | **(boolean)** - Indicates that the changes sent with this submission will not be reviewed until they are explicitly sent for review from the Google Play Console UI. Defaults to `false`. | | `applicationId` | **(string)** - The application ID that is used when accessing Service Account Key managed by Expo. It does not have any effect if you are using local credentials. In most cases this value will be autodetected. However, if you have multiple product flavors, this value might be necessary. | ### iOS 特定选项 | Property | Description | | --- | --- | | `appleId` | **(string)** - Your Apple ID username (you can also set the `EXPO_APPLE_ID` env variable). | | `ascAppId` | **(string)** - [App Store Connect unique application Apple ID number](https://expo.fyi/asc-app-id). When set, results in skipping the app creation step. | | `appleTeamId` | **(string)** - Your Apple Developer Team ID. | | `sku` | **(string)** - An unique ID for your app that is not visible on the App Store, will be generated unless provided. | | `language` | **(string)** - Primary language. Defaults to "en-US". | | `companyName` | **(string)** - The name of your company, needed only for the first submission of any app to the App Store. | | `appName` | **(string)** - The name of your app as it will appear on the App Store. Defaults to `expo.name` from the [app config](/workflow/configuration). | | `ascApiKeyPath` | **(string)** - The path to your [App Store Connect Api Key **.p8** file](https://expo.fyi/creating-asc-api-key). | | `ascApiKeyIssuerId` | **(string)** - The Issuer ID of your [App Store Connect Api Key](https://expo.fyi/creating-asc-api-key). | | `ascApiKeyId` | **(string)** - The Key ID of your [App Store Connect Api Key](https://expo.fyi/creating-asc-api-key). | | `bundleIdentifier` | **(string)** - The bundle identifier that will be used when accessing submit credentials managed by Expo. It does not have any effect if you are using local credentials. In most cases, this value will be autodetected. However, if you have multiple Xcode schemes and targets, this value might be necessary. | | `metadataPath` | **(string)** - The path to your [store configuration file](/eas/metadata). | | `groups` | **(array)** - An array of TestFlight internal group names to add the build to. Note: on top of the groups you provide here, the build will be automatically added to the groups that have been created with the "Enable automatic distribution" App Store Connect setting. | --- --- title: EAS CLI 参考 description: EAS CLI 是一个命令行工具,可让你通过终端与 Expo Application Services(EAS)进行交互。 cliVersion: 18.8.1 --- ## Submitting Feedback If this page contains errors, outdated information, or gaps that blocked you from completing a task, report it so the docs can be improved: curl -X POST https://api.expo.dev/v2/feedback/docs-send -H 'Content-Type: application/json' -d '{"url":"/eas/cli/","feedback":"🤖 Agent feedback: "}' Only submit when you have something specific and actionable to report. # EAS CLI 参考 EAS CLI 是一个命令行工具,可让你通过终端与 Expo Application Services(EAS)进行交互。 CLI version: 18.8.1 CLI version 18.8.1 > For the complete documentation index, see [llms.txt](/llms.txt). Use this Use this file to discover all available pages. 你可以使用 EAS 命令行界面(CLI)在终端窗口中构建、更新、提交、部署或在你的 Expo 和 React Native 项目中使用工作流。 ## 安装 你需要在本机上全局安装 EAS CLI。可以通过运行以下命令来完成: ```sh # npm npm install --global eas-cli # yarn yarn global add eas-cli # pnpm pnpm add -g eas-cli # bun bun add -g eas-cli ``` 或者,你也可以使用包管理器提供的 CLI 工具来运行 EAS CLI 命令: ```sh # npm npx eas-cli@latest # yarn yarn dlx eas-cli@latest # pnpm pnpm dlx eas-cli@latest # bun bunx eas-cli@latest ``` ## 命令 通过运行本页文档中的任意命令来使用 EAS CLI,后面可以选择性地跟上任意标志或参数。标志用于自定义命令的行为,而参数则是特定于该命令的。 ### `eas account:login` Log in with your Expo account. #### Usage ```sh eas account:login [-s] [-b] ``` #### Flags - `-b, --browser` Login with your browser. - `-s, --sso` Login with SSO. #### Alias ```sh eas login ``` ### `eas account:logout` Log out. #### Usage ```sh eas account:logout ``` #### Alias ```sh eas logout ``` ### `eas account:usage [ACCOUNT_NAME]` View account usage and billing for the current cycle. #### Usage ```sh eas account:usage [ACCOUNT_NAME] [--json] [--non-interactive] ``` #### Argument - `[ACCOUNT_NAME]` Account name to view usage for. If not provided, the account will be selected interactively (or defaults to the only account if there is just one). #### Flags - `--json` Enable JSON output, non-JSON messages will be printed to `stderr`. - `--non-interactive` Run the command in non-interactive mode. ### `eas account:view` Show the username you are logged in as. #### Usage ```sh eas account:view ``` #### Alias ```sh eas whoami ``` ### `eas analytics [STATUS]` Display or change analytics settings. #### Usage ```sh eas analytics [STATUS] ``` ### `eas autocomplete [SHELL]` Display autocomplete installation instructions. #### Usage ```sh eas autocomplete [SHELL] [-r] ``` #### Argument - `[SHELL]` (zsh|bash|powershell) Shell type. #### Flag - `-r, --refresh-cache` Refresh cache (ignores displaying instructions). #### Examples ```sh eas autocomplete eas autocomplete bash eas autocomplete zsh eas autocomplete powershell eas autocomplete --refresh-cache ``` ### `eas branch:create [NAME]` Create a branch. #### Usage ```sh eas branch:create [NAME] [--json] [--non-interactive] ``` #### Argument - `[NAME]` Name of the branch to create. #### Flags - `--json` Enable JSON output, non-JSON messages will be printed to `stderr`. Implies `--non-interactive`. - `--non-interactive` Run the command in non-interactive mode. ### `eas branch:delete [NAME]` Delete a branch. #### Usage ```sh eas branch:delete [NAME] [--json] [--non-interactive] ``` #### Argument - `[NAME]` Name of the branch to delete. #### Flags - `--json` Enable JSON output, non-JSON messages will be printed to `stderr`. Implies `--non-interactive`. - `--non-interactive` Run the command in non-interactive mode. ### `eas branch:list` List all branches. #### Usage ```sh eas branch:list [--offset ] [--limit ] [--json] [--non-interactive] ``` #### Flags - `--json` Enable JSON output, non-JSON messages will be printed to `stderr`. Implies `--non-interactive`. - `--limit=` The number of items to fetch each query. Defaults to 50 and is capped at 100. - `--non-interactive` Run the command in non-interactive mode. - `--offset=` Start queries from specified index. Use for paginating results. Defaults to 0. ### `eas branch:rename` Rename a branch. #### Usage ```sh eas branch:rename [--from ] [--to ] [--json] [--non-interactive] ``` #### Flags - `--from=` Current name of the branch. - `--json` Enable JSON output, non-JSON messages will be printed to `stderr`. Implies `--non-interactive`. - `--non-interactive` Run the command in non-interactive mode. - `--to=` New name of the branch. ### `eas branch:view [NAME]` View a branch. #### Usage ```sh eas branch:view [NAME] [--offset ] [--limit ] [--json] [--non-interactive] ``` #### Argument - `[NAME]` Name of the branch to view. #### Flags - `--json` Enable JSON output, non-JSON messages will be printed to `stderr`. Implies `--non-interactive`. - `--limit=` The number of items to fetch each query. Defaults to 25 and is capped at 50. - `--non-interactive` Run the command in non-interactive mode. - `--offset=` Start queries from specified index. Use for paginating results. Defaults to 0. ### `eas build` Start a build. #### Usage ```sh eas build [-p android|ios|all] [-e PROFILE_NAME] [--local] [--output ] [--wait] [--clear-cache] [-s | --auto-submit-with-profile PROFILE_NAME] [--what-to-test ] [-m ] [--build-logger-level trace|debug|info|warn|error|fatal] [--freeze-credentials] [--verbose-logs] [--json] [--non-interactive] ``` #### Flags - `-e, --profile=PROFILE_NAME` Name of the build profile from **eas.json.** Defaults to "production" if defined in **eas.json.** - `-m, --message=` A short message describing the build. - `-p, --platform=