提交至应用商店
了解如何使用 EAS Submit 从命令行将应用提交到 Google Play 商店和 Apple App Store。
EAS Submit 是一项托管服务,允许使用 EAS CLI 上传并提交应用二进制文件到应用商店。本指南介绍了如何使用 EAS Submit 将你的应用提交到 Google Play 商店和 Apple App Store。

EAS Submit 让你只需一个简单的命令就能轻松将应用发布到 App Store 和 Play 商店。
苹果应用商店
🌐 Apple App Store
4 requirements
4 requirements
1.
注册 Apple 开发者账户
提交应用到苹果应用商店需要 Apple 开发者账户。你可以在 Apple Developer Portal 注册 Apple 开发者账户。
2.
在 app.json 中包含一个打包标识符
在 app.json 中包含你的应用打包标识符:
{ "ios": { "bundleIdentifier": "com.yourcompany.yourapp" } }
3.
安装 EAS CLI 并使用你的 Expo 账户进行身份验证
安装 EAS CLI 并使用你的 Expo 账户登录:
- npm install -g eas-cli && eas login4.
构建一个生产应用
你需要一个可用于商店提交的生产版本。你可以使用 EAS Build 创建一个:
- eas build --platform ios --profile production或者,你可以在自己的电脑上使用 eas build --platform ios --profile production --local 或 Xcode 构建该应用。
完成所有先决条件后,即可启动提交流程。
🌐 Once you have completed all the prerequisites, you can start the submission process.
运行以下命令将构建提交到 Apple App Store:
🌐 Run the following command to submit a build to the Apple App Store:
- eas submit --platform ios该命令将引导你逐步完成提交应用的过程。
🌐 The command will lead you step by step through the process of submitting the app.
谷歌应用商店
🌐 Google Play Store
7 requirements
7 requirements
1.
注册 Google Play 开发者账号
提交应用到 Google Play 商店需要一个 Google Play 开发者账号。你可以在 Google Play 控制台注册页面 注册 Google Play 开发者账号。
2.
创建 Google 服务账号
EAS 要求你上传并配置 Google 服务账号密钥,以便将你的 Android 应用提交到 Google Play 商店。你可以按照 使用 EAS 上传 Google 服务账号密钥提交到 Play 商店 的指南创建密钥。
3.
在 Google Play 控制台创建应用
在 Google Play 控制台 中点击 创建应用 以创建应用。
4.
安装 EAS CLI 并使用你的 Expo 账户进行身份验证
安装 EAS CLI 并使用你的 Expo 账户登录:
- npm install -g eas-cli && eas login5.
在 app.json 中包含包名
在 app.json 中包含你的应用包名:
{ "android": { "package": "com.yourcompany.yourapp" } }
6.
构建一个生产应用
你需要一个可用于商店提交的生产版本。你可以使用 EAS Build 创建一个:
- eas build --platform android --profile production或者,你可以在自己的电脑上使用 eas build --platform android --profile production --local 或者 Android Studio 构建该应用。
7.
至少手动上传一次你的应用
你必须至少手动上传一次你的应用。这是 Google Play 商店 API 的一个限制。
了解如何通过Android 应用首次提交指南。
完成所有先决条件后,即可启动提交流程。
🌐 Once you have completed all the prerequisites, you can start the submission process.
运行以下命令将构建提交到 Google Play Store:
🌐 Run the following command to submit a build to the Google Play Store:
- eas submit --platform android该命令将引导你逐步完成提交应用的过程。
🌐 The command will lead you step by step through the process of submitting the app.
自动构建和提交
🌐 Build and submit automatically
你可以使用 EAS Workflows 自动创建构建并提交到应用商店。首先,你需要 配置你的项目,在项目根目录下添加一个名为 .eas/workflows/build-and-submit.yml 的文件,然后添加以下工作流程配置:
🌐 You can automatically create builds and submit them to the app stores with EAS Workflows. First, you'll need to 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:
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 }}
上面的工作流将在每次提交到你项目的 main 分支时创建 Android 和 iOS 构建,然后分别提交到 Google Play 和 Apple App Store。你也可以使用以下 EAS CLI 命令手动运行此工作流:
🌐 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:
- eas workflow:run build-and-submit.yml通过工作流示例指南了解更多常见模式。
🌐 Learn more about common patterns with the workflows examples guide.
手动提交到应用商店
🌐 Manual submission to app stores
你也可以手动将你的应用提交到 Google Play 商店和 Apple App Store。
🌐 You can also submit your app manually to the Google Play Store and Apple App Store.
了解如何手动将你的应用提交到苹果应用商店。
按照手动提交你的应用到 Google Play 商店的步骤操作。
下一步
🌐 Next step
了解如何使用 eas.json 文件预先配置你的项目,以便使用 EAS Submit,并了解更多关于 Android 或 iOS 的特定选项。