站点地图

编辑页面

了解如何使用站点地图来调试你的应用,适用于 Expo Router。


For the complete documentation index, see llms.txt. Use this Use this file to discover all available pages.

在原生环境中,你可以使用 uri-scheme CLI 在设备上测试打开原生链接。

例如,如果你想在 iOS 上启动 Expo Go 应用并跳转到 /form-sheet 路由,请运行:

Terminal
npx uri-scheme open exp://192.168.87.39:19000/--/form-sheet --ios

192.168.87.39:19000 替换为运行 npx expo start 时显示的 IP 地址。

你也可以直接在 Safari 或 Chrome 等浏览器中搜索链接,以在实体设备上测试深度链接。了解更多关于测试深度链接的信息。

站点地图

Expo Router 目前会自动注入一个 /_sitemap,它提供应用中所有路由的列表。这对于调试很有用。

可以通过在应用配置中的 expo-router 配置插件里添加 sitemap: false 来移除站点地图:

app.json
{ "plugins": [ [ "expo-router", { "sitemap": false } ] ] }