Align staging/production builds with APP_VARIANT bundle IDs, allow staging HTTP on iOS, add ios-prebuild scripts for TestFlight, and show connected API URL on About for non-production builds. Co-authored-by: Cursor <cursoragent@cursor.com>
35 lines
1.7 KiB
Plaintext
35 lines
1.7 KiB
Plaintext
# 复制为 .env.development / .env.staging / .env.production 后填写(勿提交含密钥的副本)。
|
||
# 仓库已提交三份模板:.env.development、.env.staging、.env.production。
|
||
# 本地:npm start 会通过 prestart 执行 `use-env development` 生成 .env;
|
||
# 或手动 `npm run use-env -- staging` / `npm run use-env -- production`。
|
||
# CI:GitHub Actions 在构建 APK 前会按分支调用 use-env(main → staging,tag → production)。
|
||
# iOS 本机 TestFlight:npm run ios:prebuild:staging|production(见 scripts/ios-prebuild.sh)。
|
||
#
|
||
# APP_VARIANT / EXPO_PUBLIC_APP_VARIANT:控制 Bundle ID 与「关于」页是否显示后端地址
|
||
# development / staging → 显示版本 + API 地址;production → 仅版本号
|
||
#
|
||
# 变量在构建时注入;修改后需重新 prebuild/打包客户端。
|
||
#
|
||
# 助手朗读:无独立 EXPO_PUBLIC_* TTS 开关。会话页顶栏在每轮 WebSocket 中带 `tts_this_turn`;
|
||
# 服务端是否具备合成能力见 api/.env 中 ENABLE_TTS 等(模板见 api/.env.example)。
|
||
|
||
# --- development(本地)---
|
||
# APP_VARIANT=development
|
||
# EXPO_PUBLIC_APP_VARIANT=development
|
||
# EXPO_PUBLIC_API_URL=http://127.0.0.1:8000
|
||
# EXPO_PUBLIC_WS_URL=ws://127.0.0.1:8000
|
||
|
||
# --- staging(预发 / TestFlight staging 包)---
|
||
# APP_VARIANT=staging
|
||
# EXPO_PUBLIC_APP_VARIANT=staging
|
||
# iOS Bundle ID: org.brighteng.lifecho.staging
|
||
# EXPO_PUBLIC_API_URL=http://your-staging-host:8000
|
||
# EXPO_PUBLIC_WS_URL=ws://your-staging-host:8000
|
||
|
||
# --- production(正式)---
|
||
# APP_VARIANT=production
|
||
# EXPO_PUBLIC_APP_VARIANT=production
|
||
# iOS Bundle ID: org.brighteng.lifecho
|
||
# EXPO_PUBLIC_API_URL=https://your-api.example.com
|
||
# EXPO_PUBLIC_WS_URL=wss://your-api.example.com
|