> ## Documentation Index
> Fetch the complete documentation index at: https://supastack.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For the full documentation corpus in one file, fetch: https://supastack.dev/llms-full.txt

# 深链接与应用配置

URL scheme、界面路由表，以及打包配置的契约。

## 一个环境变量派生 scheme

EXPO_PUBLIC_APP_SCHEME 提供给 apps/mobile/app.config.ts，后者通过登录流程所用的同一套移动认证配置，派生出深链接 scheme 与生产允许来源。该值会经过校验 —— 只允许小写 scheme 字符 —— 且 http、https、file、javascript、data、exp、exps 等保留 scheme 会被拒绝。出厂默认值为 supastack。

app.json 中两个标识符出厂均为 com.supastack.app（ios.bundleIdentifier 与 android.package）；首次上传商店前，请连同 scheme 一起改名。

```
# apps/mobile/.env.local
EXPO_PUBLIC_APP_SCHEME=supastack
```


## 应用接受的链接形态

深链接仅支持自定义 scheme：<scheme>://auth/callback 完成一次登录交接，<scheme>://invite/<token> 打开邀请界面并把 token 提交到邀请接受路由。未配置 universal link —— app.json 没有声明 associatedDomains —— 因此所有链接都经 scheme 解析。

apps/mobile/app 下的 expo-router 路由表：index 是登录界面，onboarding 与 new-organization 处理首次运行设置，paywall 呈现购买，feedback 是未登录也可用的独立界面。(app) 组内的标签页为 home、chat、notifications、settings；content、commerce、assistant 是从首页快捷操作进入的隐藏界面，settings 还包含自己的子界面栈。


## 打包意味着两侧必须一致

公开的 Expo 值会被烘进分发的二进制包，而服务器按请求用 MOBILE_ALLOWED_ORIGINS 校验移动端回调。这对值必须匹配：修改 scheme 或来源意味着同时发布新应用构建与服务器部署，绝不能只改一边。


## 没有 OTA 更新通道

套件不附带 expo-updates 依赖，也没有 updates 配置 —— JavaScript 改动只能通过新的商店构建触达用户。保持 API 兼容最旧的受支持构建，或用服务端驱动的状态来门控新能力。


## 验证与排障

测试冷启动链接、应用在后台运行时到达的链接，以及未登录状态下收到的链接。如果链接打开的是商店页面或浏览器而不是应用，说明已安装构建的 scheme 与 EXPO_PUBLIC_APP_SCHEME 不一致。


## 下一篇

[原生 UI 与主题](https://supastack.dev/zh/docs/mobile/ui.md)
