首页指南参考教程

应用存储元数据

简要概述如何使用 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 元数据来自动化和维护你的应用商店的存在。

¥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 元数据目前仅支持 Apple App Store。

¥EAS Metadata currently only supports the Apple App Store.

使用 VS Code?在 store.config.json 文件中安装 Expo 工具扩展 以实现自动补齐、建议和警告。

¥Using VS Code? Install the Expo Tools extension for auto-complete, suggestions, and warnings in your store.config.json files.

创建存储配置

¥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 属性。它有助于不向后兼容的版本控制更改。

¥An important thing to remember from the above example is the configVersion property. It helps with versioning changes that are not backward compatible.

有关可在 store.config.json 中定义的属性的更多信息,请参阅 EAS 元数据架构

¥For more information on properties that can be defined in store.config.json, see Schema for EAS Metadata.

上传存储配置

¥Upload the store config

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

¥Before pushing the store.config.json to the app stores, you must upload a new binary of your app. See App Store submissions for more information. After the binary is submitted and processed, you can continue with the step below.

创建 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 元数据的不同方法。

Expo 中文网 - 粤ICP备13048890号