-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.config.ts
132 lines (127 loc) · 5.03 KB
/
app.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
import "dotenv/config";
import type { IntercomPluginProps } from "@intercom/intercom-react-native/lib/typescript/expo-plugins/@types";
import type { withSentry } from "@sentry/react-native/expo";
import type { ExpoConfig } from "expo/config";
import type { PluginConfigType as BuildPropertiesConfig } from "expo-build-properties/build/pluginConfig";
import type withCamera from "expo-camera/plugin/build/withCamera";
import type { FontProps } from "expo-font/plugin/build/withFonts";
import type * as OneSignalPlugin from "onesignal-expo-plugin/types/types";
import metadata from "./package.json";
import versionCode from "./src/generated/versionCode.js";
const { Mode } = require("onesignal-expo-plugin/build/types/types") as typeof OneSignalPlugin; // eslint-disable-line @typescript-eslint/no-require-imports, unicorn/prefer-module
if (process.env.APP_DOMAIN) process.env.EXPO_PUBLIC_DOMAIN ??= process.env.APP_DOMAIN;
if (process.env.EAS_BUILD_RUNNER === "eas-build") {
process.env.EXPO_PUBLIC_DOMAIN ??= "web.exactly.app";
process.env.EXPO_PUBLIC_ALCHEMY_API_KEY ??= "Wz728rhq_yGIAXdRmCy4VuKIAFjSmlpc";
process.env.EXPO_PUBLIC_ALCHEMY_GAS_POLICY_ID ??= "cb9db554-658f-46eb-ae73-8bff8ed2556b";
process.env.EXPO_PUBLIC_ONE_SIGNAL_APP_ID ??= "31d4be98-1fa3-4a8c-9657-dc21c991adc7";
process.env.EXPO_PUBLIC_SENTRY_DSN ??=
"https://[email protected]/4506186349674496";
}
process.env.EXPO_PUBLIC_INTERCOM_APP_ID ??= "eknd6y0s";
export default {
name: "Exa",
slug: "exactly",
scheme: "exactly",
version: metadata.version,
orientation: "portrait",
android: {
package: "app.exactly",
adaptiveIcon: { foregroundImage: "src/assets/icon.png", backgroundColor: "#1D1D1D" },
permissions: ["android.permission.CAMERA"],
userInterfaceStyle: "automatic",
versionCode,
splash: {
backgroundColor: "#FCFCFC",
image: "src/assets/splash.png",
mdpi: "src/assets/splash.png",
hdpi: "src/assets/[email protected]",
xhdpi: "src/assets/[email protected]",
xxhdpi: "src/assets/[email protected]",
xxxhdpi: "src/assets/[email protected]",
dark: {
backgroundColor: "#1D1D1D",
image: "src/assets/splash-dark.png",
mdpi: "src/assets/splash-dark.png",
hdpi: "src/assets/[email protected]",
xhdpi: "src/assets/[email protected]",
xxhdpi: "src/assets/[email protected]",
xxxhdpi: "src/assets/[email protected]",
},
},
},
ios: {
icon: "src/assets/icon-ios.png",
bundleIdentifier: "app.exactly",
associatedDomains: [`webcredentials:${process.env.EXPO_PUBLIC_DOMAIN ?? "web.exactly.app"}`],
supportsTablet: true,
buildNumber: String(versionCode),
infoPlist: {
NSCameraUsageDescription: "This app uses the camera to verify your identity.",
NSLocationWhenInUseUsageDescription: "This app uses your location to verify your identity.",
},
userInterfaceStyle: "automatic",
splash: {
backgroundColor: "#FCFCFC",
image: "src/assets/splash.png",
dark: { backgroundColor: "#1D1D1D", image: "src/assets/splash-dark.png" },
},
},
web: { output: "static", favicon: "src/assets/favicon.png" },
plugins: [
[
"expo-build-properties",
{
android: {
packagingOptions: { pickFirst: ["**/libcrypto.so"] },
extraMavenRepos: ["https://sdk.withpersona.com/android/releases"],
},
ios: { deploymentTarget: "15.0" },
} satisfies BuildPropertiesConfig,
],
[
"expo-camera",
{
cameraPermission: "Exactly needs your permission to scan QR codes.",
} satisfies Parameters<typeof withCamera>[1],
],
[
"expo-font",
{
fonts: [
"src/assets/fonts/BDOGrotesk-Bold.otf",
"src/assets/fonts/BDOGrotesk-Regular.otf",
"src/assets/fonts/IBMPlexMono-Bold.otf",
"src/assets/fonts/IBMPlexMono-Regular.otf",
"src/assets/fonts/IBMPlexMono-SemiBold.otf",
],
} satisfies FontProps,
],
"expo-router",
[
"@intercom/intercom-react-native",
{
appId: process.env.EXPO_PUBLIC_INTERCOM_APP_ID,
androidApiKey: "android_sdk-d602d62cbdb9e8e0a6f426db847ddc74d2e26090",
iosApiKey: "ios_sdk-ad6831098d9c2d69bd98e92a5ad7a4f030472a92",
} satisfies IntercomPluginProps,
],
[
"@sentry/react-native/expo",
{ organization: "exactly", project: "mobile" } satisfies Parameters<typeof withSentry>[1],
],
[
"onesignal-expo-plugin",
{
mode: process.env.NODE_ENV === "production" ? Mode.Prod : Mode.Dev,
smallIcons: ["src/assets/notifications_default.png"],
largeIcons: ["src/assets/notifications_default_large.png"],
} satisfies OneSignalPlugin.OneSignalPluginProps,
],
],
experiments: { typedRoutes: true },
extra: { eas: { projectId: "06bc0158-d23b-430b-a7e8-802df03c450b" } },
updates: { url: "https://u.expo.dev/06bc0158-d23b-430b-a7e8-802df03c450b" },
runtimeVersion: { policy: "fingerprint" },
owner: "exactly",
} satisfies ExpoConfig;