使用 Expo Router 的 组件

了解如何独立于其他 EAS 服务(例如 Build)使用 EAS Update。


EAS Update 作为独立服务运行良好,因此你可以在有或没有 EAS Build 和其他 EAS 服务的情况下使用它。其所有主要功能都设计为与构建管道无关,并且由不使用其他 EAS 服务的大型组织在生产中使用。

¥EAS Update works great as a standalone service, so you can use it with or without EAS Build and other EAS services. All of its main features are designed to be agnostic of the build pipeline, and its used in production by large organizations that do not use other EAS services.

What are the downsides of using EAS Update without other EAS services?

EAS 更新和构建紧密合作,提供大于各部分总和的体验。例如,当你使用 EAS Build 创建构建时,我们将帮助你记录与更新相关的各个方面,例如运行时版本和渠道。

¥EAS Update and Build work closely together to provide an experience that is greater than the sum of its parts. For example, when you create a build with EAS Build we will help with the bookkeeping for various aspects related to updates, such as the runtime version and channel.

使用相同渠道和运行时版本的构建被分组到 expo.dev 上的部署部分。如果你独立于其他 EAS 服务使用 EAS Update,则这些依赖于构建或应用其他方面的知识的簿记和洞察功能将不可用。

¥Builds that use the same channel and runtime version are grouped into a Deployments section on expo.dev. These sorts of bookkeeping and insights features that depend on knowledge of builds or other aspects of your app won't be available if you use EAS Update independently of other EAS services.

也就是说,许多组织已经在其 CI/CD 基础设施上投入了大量资金,或者可能有其他原因想要使用另一个构建管道,并且 EAS 服务之间更深层次集成所提供的好处可能不值得迁移到其他 CI/CD 提供商的切换成本。

¥That said, many organizations are already heavily invested in their CI/CD infrastructure or may have other reasons for wanting to use another build pipeline, and the benefits offered by deeper integration across EAS services may not be worth the switching costs of migrating to a different CI/CD provider.

使用 EAS Update 而不使用其他 EAS 服务

¥Using EAS Update without EAS Build

无论你是否使用 EAS Build,大多数 安装和配置步骤 都是相同的。主要区别在于更新 channel 的配置方式。使用 EAS Build 时,eas.json 中的通道将在构建时自动添加到构建的 AndroidManifest.xml 和 Expo.plist 中。不使用 EAS Build 时,必须由 在应用配置中设置请求标头 手动配置,然后在服务器上手动创建通道。

¥Most of the installation and configuration steps are identical whether or not you use EAS Build. The primary difference is how the update channel is configured. When using EAS Build, the channel from eas.json will automatically be added to your build's AndroidManifest.xml and Expo.plist at build time. When not using EAS Build, this must be configured manually by setting the request header in the app config, followed by manually creating the channel on the server.

Terminal
# Create a channel named `production` (for example, which points to the production EAS Update branch by default)# Your channel names may vary depending on release process
eas channel:create production