Skip to content
79 linesCodeBlameRaw
1import type { ConfigContext, ExpoConfig } from "expo/config";
2
3/**
4 * The phone app's configuration. `APP_VARIANT` (set by eas.json's
5 * profiles) picks an identity, so a development build, a preview build
6 * and the store build install side by side on one phone:
7 *
8 * | Variant | Android package / iOS bundle | Name |
9 * | ------------- | ---------------------------- | ----------- |
10 * | `development` | `sh.g1t.app.dev` | g1t (dev) |
11 * | `preview` | `sh.g1t.app.preview` | g1t (beta) |
12 * | production | `sh.g1t.app` | g1t |
13 *
14 * The EAS project is set once `eas init` has made one (README.md); until
15 * then, builds and updates are not linked to one.
16 */
17
18/** The EAS project's id, from `eas init`. `EAS_PROJECT_ID` overrides it. */
19const EAS_PROJECT: string | undefined = undefined;
20
21const variant = process.env.APP_VARIANT;
22const suffix = variant === "development" ? ".dev" : variant === "preview" ? ".preview" : "";
23const name = variant === "development" ? "g1t (dev)" : variant === "preview" ? "g1t (beta)" : "g1t";
24const id = `sh.g1t.app${suffix}`;
25const projectId = process.env.EAS_PROJECT_ID ?? EAS_PROJECT;
26
27/** g1t's background, dark as the site is by default (packages/theme/tokens.css `--g1t-bg`). */
28const BACKGROUND = "#0f0f11";
29
30export default ({ config }: ConfigContext): ExpoConfig => ({
31 ...config,
32 name,
33 slug: "g1t",
34 owner: process.env.EAS_OWNER,
35 version: "0.1.0",
36 orientation: "portrait",
37 icon: "./assets/images/icon.png",
38 // g1t:// links, as on the desktop, and where sign-in comes back to.
39 scheme: "g1t",
40 userInterfaceStyle: "automatic",
41 backgroundColor: BACKGROUND,
42 ios: {
43 bundleIdentifier: id,
44 supportsTablet: true,
45 config: { usesNonExemptEncryption: false },
46 },
47 android: {
48 package: id,
49 adaptiveIcon: {
50 backgroundColor: BACKGROUND,
51 foregroundImage: "./assets/images/android-icon-foreground.png",
52 monochromeImage: "./assets/images/android-icon-monochrome.png",
53 },
54 predictiveBackGestureEnabled: true,
55 softwareKeyboardLayoutMode: "resize",
56 },
57 plugins: [
58 "expo-router",
59 "expo-secure-store",
60 "expo-web-browser",
61 [
62 "expo-splash-screen",
63 {
64 backgroundColor: BACKGROUND,
65 image: "./assets/images/splash-icon.png",
66 imageWidth: 96,
67 },
68 ],
69 ],
70 experiments: {
71 reactCompiler: true,
72 },
73 runtimeVersion: { policy: "appVersion" },
74 ...(projectId ? { updates: { url: `https://u.expo.dev/${projectId}` } } : {}),
75 extra: {
76 ...config.extra,
77 ...(projectId ? { eas: { projectId } } : {}),
78 },
79});