使用 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 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.
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.
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.
# 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