使用 Expo Router 的 XX1 组件
了解如何独立于其他 EAS 服务(例如 Build)使用 EAS Update。
EAS 更新作为独立服务运行良好,因此你可以在使用或不使用 EAS 构建及其他 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.
在不使用其他 EAS 服务的情况下使用 EAS Update 有哪些缺点?
EAS 更新和构建紧密合作,以提供大于各部分总和的体验。例如,当你使用 EAS 构建创建构建时,我们会帮助处理与更新相关的各个方面的记录,例如运行时版本和渠道。
🌐 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 上,使用相同渠道和运行时版本的构建会归入 部署(Deployments) 部分。这类依赖于构建或应用其他方面信息的管理和洞察功能,如果你单独使用 EAS Update 而不使用其他 EAS 服务,则将无法使用。
🌐 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 Build 的情况下使用 EAS Update
🌐 Using EAS Update without EAS Build
大多数安装和配置步骤无论是否使用 EAS Build 都是相同的。主要的区别在于如何配置更新通道。使用 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