应用存储元数据

简要概述如何使用 EAS 元数据来自动化和维护应用商店的存在。


重要 EAS 元数据 目前处于测试阶段,可能会发生重大变更。

在向应用商店提交应用时,你需要提供元数据。这个过程很漫长,而且通常涉及一些与你的应用无关的复杂主题。在你提供的信息被审核后,如果有任何问题,你需要重新开始这个过程。

🌐 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 元数据 让你可以从命令行自动管理和维护这些信息,而无需通过应用商店仪表板中的多个表单操作。它还可以即时识别可能在漫长的审核队列后导致拒审的知名应用商店限制。本指南展示了如何使用 EAS 元数据来自动化和维护你的应用商店信息。

先决条件

🌐 Prerequisites

EAS 元数据目前仅支持 Apple App Store

🌐 EAS Metadata currently only supports the Apple App Store.

使用 VS Code?安装 Expo Tools 扩展,以便在 store.config.json 文件中获得自动补齐、建议和警告功能。

创建存储配置

🌐 Create a store config

EAS 元数据使用 store.config.json 文件来保存你想要上传到应用商店的所有信息。该文件位于你的 Expo 项目的根目录。

🌐 EAS Metadata uses store.config.json 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.

在项目目录的根目录下创建一个新的 store.config.json 文件,如下例所示:

🌐 Create a new store.config.json file at the root of your project directory as shown in the example below:

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" } } } }

上面的示例文件包含 JSON 架构。将示例值替换为你自己的值。它通常包含你的应用的 titlesubtitledescriptionkeywordsmarketingUrl 等。

🌐 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.

从上面的例子中需要记住的一件重要事情是 configVersion 属性。 它有助于处理不向后兼容的版本更改。

有关可以在 store.config.json 中定义的属性的更多信息,请参见 EAS 元数据模式

上传存储配置

🌐 Upload the store config

在将 store.config.json 推送到应用商店之前,你必须上传应用的新二进制文件。有关更多信息,请参阅 App Store 提交。在二进制文件提交并处理完成后,你可以继续下面的步骤。

在你创建了 store.config.json 文件并添加了与你的应用相关的必要信息后,你可以通过运行以下命令将存储配置推送到应用商店:

🌐 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:

Terminal
eas metadata:push

如果 EAS 元数据在你的存储配置中遇到任何问题,它将在运行此命令时警告你。如果没有错误,或者你确认要在可能存在问题的情况下推送,它将尽量上传尽可能多的数据。

🌐 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.

当你修改 store.config.json 文件并想将最新更改推送到应用商店时,也可以重复使用此命令。

🌐 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

EAS 元数据架构

EAS 元数据中存储配置的参考。

使用 EAS 元数据进行静态和动态配置

了解配置 EAS 元数据的不同方法。