预览更新
了解如何在开发、预览和生产版本中预览更新。
在将更新部署到生产环境之前,你通常希望先在类似生产的环境中进行测试。本指南将概述预览更新的不同方法,并链接到每种方法的详细指南。
🌐 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 库提供的内置界面进行预览。
🌐 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 通过 EAS Update 自动发布更新
了解如何使用 macOS、Windows 和 Linux 桌面应用 Expo Orbit 推出更新
预览版本中的预览更新
🌐 Previewing updates in preview builds
非技术用户通常不希望与开发版本互动,他们更希望通过应用商店测试渠道或内部分发来测试预览版本的更改。
🌐 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.
了解如何使用持久化预发布流程,以始终拥有一个指向预发布通道的生产应用版本。