预览更新

了解如何在开发、预览和生产版本中预览更新。


在将更新部署到生产环境之前,你通常需要在类似生产的环境中进行测试。本指南将概述预览更新的不同方法,并链接到每种方法的更详细指南。

¥Before deploying an update to production, you will often want to test it in a production-like environment. This guide will outline different approaches for previewing updates, and link out to more detailed guides for each approach.

预览开发版本中的更新

¥Previewing updates in development builds

开发构建版本是预览拉取请求更新的绝佳方式,可以直接从 EAS 仪表板或 expo-dev-client 库提供的内置 UI 中预览。

¥Development builds are a great way to preview updates from pull requests, directly from the EAS dashboard, or from the built-in UI provided by the expo-dev-client library.

开发版本中的预览更新

了解如何在开发版本中预览更新。

使用 GitHub Actions 自动发布更新

了解如何使用 GitHub Actions 通过 EAS Update 自动发布更新

使用 Orbit 从 EAS 仪表板启动预览更新

了解如何使用 macOS、Windows 和 Linux 桌面应用 Expo Orbit 启动更新。

预览版本中的预览更新

¥Previewing updates in preview builds

非技术用户通常不想与开发版本交互,他们希望在 App Store 测试轨道内部分配 上测试预览版本的更改。

¥Non-technical users will typically not want to interact with a development build, and they will want to test changes from a preview build on an App store testing track or internal distribution.

如果你的团队规模较小,一次将一个预览版本部署到应用商店测试轨道或内部分发版可能就足够了。然后,你可以将更新发布到该预览版本使用的通道。了解更多关于预览版本的信息

¥If your team is smaller, it may be sufficient to deploy a single preview build at a time to an app store testing track or internal distribution. You can then publish updates to the channel that is used by that preview build. Learn more about preview builds.

或者,你可以在预览版本中构建一种机制,允许用户选择要加载的其他更新或渠道。这在 应用运行时 不经常更改且可以在同一个应用中加载许多不同更新的情况下非常有用。了解更多

¥Alternatively, you can build a mechanism into your preview build that allows users to select a different update or channel to load. This can be useful in cases where the app runtime doesn't change often, and many different updates can be loaded in the same app. Learn more.

在运行时覆盖更新配置

了解如何在运行时覆盖更新 URL 和渠道。

生产版本中的预览更新

¥Previewing updates in production builds

在将更新部署到所有终端用户之前,某些团队可能希望先在生产环境中将其推广到一小部分内部用户。实现此目的的一种方法是在运行时针对已知的用户子集使用 覆盖更新渠道。在继续此操作之前,请务必注意 安全注意事项。此外,不建议非内部用户使用此方法,因为这可能会导致应用处于必须卸载并重新安装的状态。

¥Before deploying an update to all end-users, some teams will want to first roll it out in production to a small set of internal users. One way this can be accomplished is by overriding the update channel at runtime for a known subset of users. Be sure to note the security considerations before proceeding down this path. Additionally, it is not recommended to use this approach for non-internal users because it makes it possible to get the app into a state where it must be uninstalled and reinstalled.

另一种方法是使用类似 持久暂存流程 的部署模式,该模式要求始终有一个指向暂存渠道的生产应用版本。

¥Another approach is to use a deployment pattern like the Persistent Staging Flow, which involves always having a version of your production app that points to a staging channel.

持久暂存流程

了解如何使用持久暂存流程 (Persistent Staging Flow),始终确保生产应用的某个版本指向暂存渠道。