Skip to content

Commit a62b2ac

Browse files
separate versions
1 parent 3d3e847 commit a62b2ac

13 files changed

Lines changed: 312 additions & 97 deletions

File tree

apps/mobile/README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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+
11+
This 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+
17+
Run commands from `apps/mobile`.
18+
19+
## Development
20+
21+
Start Metro for the dev client:
22+
23+
```bash
24+
bun run dev:client
25+
```
26+
27+
Build and run the local iOS dev client:
28+
29+
```bash
30+
bun run ios:dev
31+
```
32+
33+
Build and run the local iOS preview app:
34+
35+
```bash
36+
bun run ios:preview
37+
```
38+
39+
Inspect the resolved Expo config for a variant:
40+
41+
```bash
42+
bun run config:dev
43+
bun run config:preview
44+
```
45+
46+
## EAS Builds
47+
48+
Create a cloud dev-client build:
49+
50+
```bash
51+
bun run eas:ios:dev
52+
```
53+
54+
Create a persistent preview build:
55+
56+
```bash
57+
bun run eas:ios:preview
58+
```
59+
60+
Android equivalents:
61+
62+
```bash
63+
bun run eas:android:dev
64+
bun run eas:android:preview
65+
```

apps/mobile/TODO.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

apps/mobile/app.config.ts

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
import type { ExpoConfig } from "expo/config";
2+
3+
type AppVariant = "development" | "preview" | "production";
4+
5+
const APP_VARIANT = resolveAppVariant(process.env.APP_VARIANT);
6+
7+
const VARIANT_CONFIG: Record<
8+
AppVariant,
9+
{
10+
readonly appName: string;
11+
readonly iosIcon: string;
12+
readonly iosBundleIdentifier: string;
13+
readonly androidPackage: string;
14+
}
15+
> = {
16+
development: {
17+
appName: "T3 Code Dev",
18+
iosIcon: "./assets/icon-composer-dev.icon",
19+
iosBundleIdentifier: "com.t3tools.t3code.dev",
20+
androidPackage: "com.t3tools.t3code.dev",
21+
},
22+
preview: {
23+
appName: "T3 Code Preview",
24+
iosIcon: "./assets/icon-composer-prod.icon",
25+
iosBundleIdentifier: "com.t3tools.t3code.preview",
26+
androidPackage: "com.t3tools.t3code.preview",
27+
},
28+
production: {
29+
appName: "T3 Code",
30+
iosIcon: "./assets/icon-composer-prod.icon",
31+
iosBundleIdentifier: "com.t3tools.t3code",
32+
androidPackage: "com.t3tools.t3code",
33+
},
34+
};
35+
36+
function resolveAppVariant(value: string | undefined): AppVariant {
37+
switch (value) {
38+
case "development":
39+
case "preview":
40+
case "production":
41+
return value;
42+
default:
43+
return "production";
44+
}
45+
}
46+
47+
const variant = VARIANT_CONFIG[APP_VARIANT];
48+
49+
const config: ExpoConfig = {
50+
name: variant.appName,
51+
slug: "t3-code",
52+
scheme: "t3code",
53+
version: "0.1.0",
54+
runtimeVersion: {
55+
policy: "appVersion",
56+
},
57+
orientation: "portrait",
58+
icon: "./assets/icon.png",
59+
userInterfaceStyle: "automatic",
60+
updates: {
61+
enabled: true,
62+
url: "https://u.expo.dev/d763fcb8-d37c-41ea-a773-b54a0ab4a454",
63+
checkAutomatically: "ON_LOAD",
64+
fallbackToCacheTimeout: 0,
65+
},
66+
splash: {
67+
image: "./assets/splash-icon.png",
68+
resizeMode: "contain",
69+
backgroundColor: "#ffffff",
70+
},
71+
ios: {
72+
icon: variant.iosIcon,
73+
supportsTablet: true,
74+
bundleIdentifier: variant.iosBundleIdentifier,
75+
infoPlist: {
76+
NSAppTransportSecurity: {
77+
NSAllowsArbitraryLoads: true,
78+
},
79+
ITSAppUsesNonExemptEncryption: false,
80+
},
81+
},
82+
android: {
83+
icon: "./assets/icon.png",
84+
package: variant.androidPackage,
85+
adaptiveIcon: {
86+
backgroundColor: "#E6F4FE",
87+
foregroundImage: "./assets/android-icon-foreground.png",
88+
backgroundImage: "./assets/android-icon-background.png",
89+
monochromeImage: "./assets/android-icon-monochrome.png",
90+
},
91+
predictiveBackGestureEnabled: false,
92+
},
93+
web: {
94+
favicon: "./assets/favicon.png",
95+
},
96+
plugins: [
97+
[
98+
"expo-camera",
99+
{
100+
cameraPermission: "Allow T3 Code to access your camera so you can scan pairing QR codes.",
101+
barcodeScannerEnabled: true,
102+
},
103+
],
104+
[
105+
"expo-splash-screen",
106+
{
107+
image: "./assets/splash-icon.png",
108+
resizeMode: "contain",
109+
backgroundColor: "#ffffff",
110+
imageWidth: 220,
111+
dark: {
112+
image: "./assets/splash-icon.png",
113+
backgroundColor: "#0a0a0a",
114+
},
115+
},
116+
],
117+
"expo-secure-store",
118+
"expo-router",
119+
"./plugins/withAndroidCleartextTraffic.cjs",
120+
],
121+
extra: {
122+
appVariant: APP_VARIANT,
123+
eas: {
124+
projectId: "d763fcb8-d37c-41ea-a773-b54a0ab4a454",
125+
},
126+
},
127+
owner: "pingdotgg",
128+
};
129+
130+
export default config;

apps/mobile/app.json

Lines changed: 0 additions & 81 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Loading
10.2 MB
Loading
1.69 MB
Loading
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"fill": {
3+
"solid": "display-p3:0.00000,0.00000,0.00000,1.00000"
4+
},
5+
"groups": [
6+
{
7+
"layers": [
8+
{
9+
"hidden": false,
10+
"image-name": "gpt-image-1.5-jd70szmrd03p36z4zv48ycsbax81egvr.png",
11+
"name": "gpt-image-1.5-jd70szmrd03p36z4zv48ycsbax81egvr",
12+
"position": {
13+
"scale": 1.1,
14+
"translation-in-points": [0, 0]
15+
}
16+
},
17+
{
18+
"image-name": "T3.svg",
19+
"name": "T3",
20+
"position": {
21+
"scale": 10,
22+
"translation-in-points": [0, 0]
23+
}
24+
},
25+
{
26+
"hidden": true,
27+
"image-name": "Texturelabs_Paper_381XL.jpg",
28+
"name": "Texturelabs_Paper_381XL"
29+
}
30+
],
31+
"shadow": {
32+
"kind": "neutral",
33+
"opacity": 0.5
34+
},
35+
"translucency": {
36+
"enabled": true,
37+
"value": 0.5
38+
}
39+
}
40+
],
41+
"supported-platforms": {
42+
"circles": ["watchOS"],
43+
"squares": "shared"
44+
}
45+
}
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"fill": {
3+
"solid": "display-p3:0.00000,0.00000,0.00000,1.00000"
4+
},
5+
"groups": [
6+
{
7+
"layers": [
8+
{
9+
"image-name": "T3.svg",
10+
"name": "T3",
11+
"position": {
12+
"scale": 10,
13+
"translation-in-points": [0, 0]
14+
}
15+
}
16+
],
17+
"shadow": {
18+
"kind": "neutral",
19+
"opacity": 0.5
20+
},
21+
"translucency": {
22+
"enabled": true,
23+
"value": 0.5
24+
}
25+
}
26+
],
27+
"supported-platforms": {
28+
"circles": ["watchOS"],
29+
"squares": "shared"
30+
}
31+
}

0 commit comments

Comments
 (0)