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 的任何请求中。

ParamRequiredDefaultDescription
slugNoexp使用 app config 中的 slug 来定位开发构建。否则使用 "exp" 来定位 Expo Go。
appScheme (deprecated)Noexp已被 slug 替换。请改用 slug
hostNou.expo.dev处理更新请求的服务器主机名。
formatNosvg端点默认返回 SVG。若要接收纯文本 URL,请使用 url

Update by device traits

预览和生产构建会向 EAS Update 服务发出带有 runtimeVersionchannel 属性的请求。你可以使用以下查询参数模拟这种行为:

ParamRequiredDescription
projectIdYes项目的 ID
runtimeVersionYes构建的 runtime version
channelYes构建的频道名称

Example

https://qr.expo.dev/eas-update?projectId=your-project-id&runtimeVersion=your-runtime-version&channel=your-channel

Update by ID

你可以为给定的平台特定 ID 创建一个特定更新的 QR 码。

ParamRequiredDescription
updateIdYes更新的 ID

Example

https://qr.expo.dev/eas-update?updateId=your-update-id

Update by group ID

你可以为给定的更新组 ID 创建一个更新组的 QR 码。

ParamRequiredDescription
projectIdYes项目的 ID
groupIdYes更新组的 ID

Example

https://qr.expo.dev/eas-update?projectId=your-project-id&groupId=your-update-id

Update by branch ID

你可以使用分支的 ID 创建一个 QR 码,它将返回该分支上可用的最新更新。

ParamRequiredDescription
projectIdYes项目的 ID
branchIdYes分支的 ID

Example

https://qr.expo.dev/eas-update?projectId=your-project-id&branchId=your-branch-id

Update by channel ID

你可以使用频道的 ID 创建一个 QR 码,它将返回映射到该频道的分支上的最新可用更新。

ParamRequiredDescription
projectIdYes项目的 ID
channelIdYes频道的 ID

Example

https://qr.expo.dev/eas-update?projectId=your-project-id&channelId=your-channel-id