Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

README.md

122 lines3.2 KB

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​
37If your Xcode account only has a Personal Team, use a bundle identifier you control and opt into the
38reduced-capability local build. Personal Team builds omit the widget and share extensions, push
39entitlement, and native Sign in with Apple entitlement; builds without this opt-in are unchanged.
40​
41```bash
42T3CODE_IOS_PERSONAL_TEAM=1 \
43T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID=com.example.t3code.dev \
44vp run ios:dev
45```
46​
47Build and install a self-contained Release app that does not need Metro:
48​
49```bash
50vp run ios:release
51```
52​
53The Personal Team equivalent also needs a unique bundle identifier:
54​
55```bash
56T3CODE_IOS_PERSONAL_TEAM=1 \
57T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID=com.example.t3code \
58vp run ios:release
59```
60​
61Build and run the local iOS preview app:
62​
63```bash
64vp run ios:preview
65```
66​
67Force the review diff highlighter engine:
68​
69```bash
70EXPO_PUBLIC_REVIEW_HIGHLIGHTER_ENGINE=javascript vp run ios:dev
71```
72​
73`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.
74​
75Inspect the resolved Expo config for a variant:
76​
77```bash
78vp run config:dev
79vp run config:preview
80```
81​
82Run static checks for mobile native code:
83​
84```bash
85node ../../scripts/mobile-native-static-check.ts
86```
87​
88The 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.
89​
90## EAS Builds
91​
92CI 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.
93​
94For preview or production EAS environments, set `T3CODE_CLERK_PUBLISHABLE_KEY`,
95`T3CODE_CLERK_JWT_TEMPLATE`, and `T3CODE_RELAY_URL`
96as EAS environment variables. Expo config maps the canonical values into the mobile build.
97​
98Create a PR preview dev-client build manually:
99​
100```bash
101vp run eas:ios:preview:dev
102```
103​
104Create a cloud dev-client build:
105​
106```bash
107vp run eas:ios:dev
108```
109​
110Create a persistent preview build:
111​
112```bash
113vp run eas:ios:preview
114```
115​
116Android equivalents:
117​
118```bash
119vp run eas:android:dev
120vp run eas:android:preview:dev
121vp run eas:android:preview
122```