Repository navigation
Expand file tree
/
Copy pathapp.config.ts
More file actions
142 lines (139 loc) · 4.11 KB
/
Copy pathapp.config.ts
File metadata and controls
142 lines (139 loc) · 4.11 KB
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
133
134
135
136
137
138
139
140
141
142
import { ConfigContext, ExpoConfig } from "expo/config";
import packageJson from "./package.json";
export default ({ config }: ConfigContext): ExpoConfig => {
// EAS Build sets APP_VARIANT for different build profiles
// For local development, default to "development"
const isProduction = process.env.APP_VARIANT === "production";
const cydApiEnv = process.env.CYD_API_ENV ?? (isProduction ? "prod" : "dev");
const iosDistribution = process.env.IOS_DISTRIBUTION ?? "app_store";
const isAltBuild = iosDistribution === "alt";
const appStoreAnnualProductId =
process.env.APP_STORE_ANNUAL_PRODUCT_ID ?? "premium_annual";
const appStoreMonthlyProductId =
process.env.APP_STORE_MONTHLY_PRODUCT_ID ?? "premium_monthly";
return {
...config,
name: "Cyd",
slug: "cyd",
version: packageJson.version,
orientation: "portrait",
icon: "./assets/images/icon.png",
scheme: ["social.cyd.api", "social.cyd.dev-api"],
userInterfaceStyle: "automatic",
platforms: ["android", "ios"],
ios: {
supportsTablet: true,
bundleIdentifier: isAltBuild
? "systems.lockdown.cyd-mobile-alt"
: "systems.lockdown.cyd-mobile",
appleTeamId: "G762K6CH36",
entitlements: {
"aps-environment": isProduction ? "production" : "development",
},
infoPlist: {
ITSAppUsesNonExemptEncryption: false,
CFBundleURLTypes: [
{
CFBundleURLSchemes: ["social.cyd.api", "social.cyd.dev-api"],
},
],
},
icon: "./assets/images/cyd.icon",
},
android: {
versionCode: packageJson.androidVersionCode,
allowBackup: true,
adaptiveIcon: {
backgroundColor: "#E6F4FE",
foregroundImage: "./assets/images/android-icon-foreground.png",
backgroundImage: "./assets/images/android-icon-background.png",
monochromeImage: "./assets/images/android-icon-monochrome.png",
},
predictiveBackGestureEnabled: false,
package: "systems.lockdown.cydmobile",
googleServicesFile: "./google-services.json",
intentFilters: [
{
action: "VIEW",
data: [
{
scheme: "social.cyd.api",
},
{
scheme: "social.cyd.dev-api",
},
],
category: ["BROWSABLE", "DEFAULT"],
},
],
},
plugins: [
"expo-router",
"expo-iap",
// Backup rules come from ./plugins/android-backup-rules instead: the
// rules bundled with expo-secure-store would drop the app's databases
// and archives from every backup.
["expo-secure-store", { configureAndroidBackup: false }],
[
"expo-build-properties",
{
ios: {
deploymentTarget: "16.4",
useFrameworks: "static",
},
android: {
enableProguardInReleaseBuilds: true,
enableShrinkResourcesInReleaseBuilds: true,
},
},
],
[
"expo-splash-screen",
{
image: "./assets/images/splash-icon.png",
imageWidth: 300,
resizeMode: "contain",
backgroundColor: "#c3d1e4",
android: {
image: "./assets/images/splash-icon-android.png",
imageWidth: 200,
},
dark: {
backgroundColor: "#3a414b",
},
},
],
"expo-video",
[
"expo-notifications",
{
icon: "./assets/images/notification-icon.png",
color: "#4A90D9",
},
],
"expo-font",
"@react-native-community/datetimepicker",
"expo-image",
"expo-localization",
"expo-sqlite",
"expo-web-browser",
"./plugins/remove-android-permissions",
"./plugins/android-backup-rules",
],
experiments: {
typedRoutes: true,
reactCompiler: true,
},
extra: {
cydApiEnv,
iosDistribution,
appStoreAnnualProductId,
appStoreMonthlyProductId,
router: {},
eas: {
projectId: "192811c5-4578-4acb-b55d-4da9d2a5f44a",
},
},
owner: "lockdownsystems",
};
};