qr.expo.dev
编辑页面
qr.expo.dev 上二维码生成器的参考文档。
For the complete documentation index, see llms.txt. Use this Use this file to discover all available pages.
qr.expo.dev 是一个生成带有 Expo 品牌的 QR 码的云函数。该函数会为 EAS Update 创建 QR 码,这些 QR 码用于在 开发构建 和 Expo Go 中预览更新。
例如,如果你和你的团队有一个开发构建,并且你想在某个构建的频道上加载最新更新,你可以前往以下端点生成 QR 码:
https://qr.expo.dev/eas-update?projectId=your-project-id&runtimeVersion=your-runtime-version&channel=your-channel
这将生成以下 QR 码 SVG:
这个 QR 码代表以下 URL:
exp+your-slug://expo-development-client/?url=https://u.expo.dev/your-project-id?runtime-version=your-runtime-version&channel-name=your-channel
此 URL 会深度链接到一个开发构建,并指示它获取指定频道上的最新更新。
如果共享 URL 更方便,你可以在查询参数中添加format=url来直接请求 URL。
General
以下参数适用于 /eas-update 端点。
Base query parameters
以下基础查询参数可以包含在发往 /eas-update 的任何请求中。
| Param | Required | Default | Description |
|---|---|---|---|
slug | No | exp | 使用 app config 中的 slug 来定位开发构建。否则使用 "exp" 来定位 Expo Go。 |
appScheme (deprecated) | No | exp | 已被 slug 替换。请改用 slug。 |
host | No | u.expo.dev | 处理更新请求的服务器主机名。 |
format | No | svg | 端点默认返回 SVG。若要接收纯文本 URL,请使用 url。 |
Update by device traits
预览和生产构建会向 EAS Update 服务发出带有 runtimeVersion 和 channel 属性的请求。你可以使用以下查询参数模拟这种行为:
| Param | Required | Description |
|---|---|---|
projectId | Yes | 项目的 ID |
runtimeVersion | Yes | 构建的 runtime version |
channel | Yes | 构建的频道名称 |
Example
https://qr.expo.dev/eas-update?projectId=your-project-id&runtimeVersion=your-runtime-version&channel=your-channel
Update by ID
你可以为给定的平台特定 ID 创建一个特定更新的 QR 码。
| Param | Required | Description |
|---|---|---|
updateId | Yes | 更新的 ID |
Example
https://qr.expo.dev/eas-update?updateId=your-update-id
Update by group ID
你可以为给定的更新组 ID 创建一个更新组的 QR 码。
| Param | Required | Description |
|---|---|---|
projectId | Yes | 项目的 ID |
groupId | Yes | 更新组的 ID |
Example
https://qr.expo.dev/eas-update?projectId=your-project-id&groupId=your-update-id
Update by branch ID
你可以使用分支的 ID 创建一个 QR 码,它将返回该分支上可用的最新更新。
| Param | Required | Description |
|---|---|---|
projectId | Yes | 项目的 ID |
branchId | Yes | 分支的 ID |
Example
https://qr.expo.dev/eas-update?projectId=your-project-id&branchId=your-branch-id
Update by channel ID
你可以使用频道的 ID 创建一个 QR 码,它将返回映射到该频道的分支上的最新可用更新。
| Param | Required | Description |
|---|---|---|
projectId | Yes | 项目的 ID |
channelId | Yes | 频道的 ID |
Example
https://qr.expo.dev/eas-update?projectId=your-project-id&channelId=your-channel-id