Open History to see the last commit
1# T3 Code Mobile
2
3> [!WARNING]
4> T3 Code Mobile is currently in development and is not distributed yet. If you want to try it out, you can build it from source.
5
6## Quickstart
7
8> [!NOTE]
9> Uses native modules so using Expo Go is not supported. You need to use the Expo Dev Client.
10
11This app has three variants:
12
13- `development`: Expo dev client, installable side-by-side as `T3 Code Dev`
14- `preview`: persistent internal preview build, installable side-by-side as `T3 Code Preview`
15- `production`: store/release build as `T3 Code`
16
17Run commands from `apps/mobile`.
18
19T3 Connect is optional and disabled in a fresh clone. Public configuration belongs in the
20repository-root `.env` or `.env.local`, not an `apps/mobile/.env` file. See
21[`../../.env.example`](../../.env.example).
22
23## Development
24
25Start Metro for the dev client:
26
27```bash
28vp run dev:client
29```
30
31Build and run the local iOS dev client:
32
33```bash
34vp run ios:dev
35```
36
37Build and run the local iOS preview app:
38
39```bash
40vp run ios:preview
41```
42
43Force the review diff highlighter engine:
44
45```bash
46EXPO_PUBLIC_REVIEW_HIGHLIGHTER_ENGINE=javascript vp run ios:dev
47```
48
49`javascript` is the default and recommended setting for the review diff screen. Set `EXPO_PUBLIC_REVIEW_HIGHLIGHTER_ENGINE=native` only when you explicitly want to test the native Shiki engine.
50
51Inspect the resolved Expo config for a variant:
52
53```bash
54vp run config:dev
55vp run config:preview
56```
57
58Run static checks for mobile native code:
59
60```bash
61node ../../scripts/mobile-native-static-check.ts
62```
63
64The native lint task runs SwiftLint for Swift plus ktlint and detekt for Kotlin. Missing native tools are reported as warnings and skipped locally. CI installs the default toolset from `apps/mobile/Brewfile` before running the native checks.
65
66## EAS Builds
67
68CI uses Expo fingerprinting with the `preview:dev` profile to reuse an existing compatible build when possible, or start a new internal EAS build when native runtime inputs change. Production and default local builds continue to use the `appVersion` runtime policy.
69
70For preview or production EAS environments, set `T3CODE_CLERK_PUBLISHABLE_KEY`,
71`T3CODE_CLERK_JWT_TEMPLATE`, and `T3CODE_RELAY_URL`
72as EAS environment variables. Expo config maps the canonical values into the mobile build.
73
74Create a PR preview dev-client build manually:
75
76```bash
77vp run eas:ios:preview:dev
78```
79
80Create a cloud dev-client build:
81
82```bash
83vp run eas:ios:dev
84```
85
86Create a persistent preview build:
87
88```bash
89vp run eas:ios:preview
90```
91
92Android equivalents:
93
94```bash
95vp run eas:android:dev
96vp run eas:android:preview:dev
97vp run eas:android:preview
98```