-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.config.ts
More file actions
122 lines (112 loc) · 2.9 KB
/
app.config.ts
File metadata and controls
122 lines (112 loc) · 2.9 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
import { ConfigContext, ExpoConfig } from "@expo/config";
const IS_DEV = process.env.APP_VARIANT === "development";
const IS_PREVIEW = process.env.APP_VARIANT === "preview";
let AndroidGoogleServicesFile = "./google-services-prod.json"; // while developing this file will be the default.
let GoogleServiceInfoPlist = "./GoogleService-Info-prod.plist";
// then checking which env we are, and based on that choosing
// the right Google services file to add
if (IS_DEV) {
AndroidGoogleServicesFile = "./google-services-dev.json";
GoogleServiceInfoPlist = "./GoogleService-Info-dev.plist";
}
const getUniqueIdentifier = () => {
if (IS_DEV) {
return "com.rnstarterkit.dev";
}
if (IS_PREVIEW) {
return "com.rnstarterkit.preview";
}
return "com.rnstarterkit";
};
const getAppName = () => {
if (IS_DEV) {
return "Starter Kit (Dev)";
}
if (IS_PREVIEW) {
return "Starter Kit (Preview)";
}
return "Starter Kit";
};
export default ({ config }: ConfigContext): ExpoConfig => {
return {
...config,
name: getAppName(),
slug: "rn-starter-kit",
version: "1.0.0",
orientation: "portrait",
icon: "./lib/assets/images/icon.png",
scheme: "exp+starter-kit",
userInterfaceStyle: "automatic",
newArchEnabled: true,
ios: {
supportsTablet: true,
googleServicesFile: GoogleServiceInfoPlist,
bundleIdentifier: getUniqueIdentifier(),
entitlements: {
"aps-environment": "production",
},
infoPlist: {
UIBackgroundModes: ["remote-notification"],
},
},
android: {
adaptiveIcon: {
foregroundImage: "./lib/assets/images/adaptive-icon.png",
backgroundColor: "#ffffff",
},
googleServicesFile: AndroidGoogleServicesFile,
package: getUniqueIdentifier(),
},
web: {
bundler: "metro",
output: "static",
favicon: "./lib/assets/images/favicon.png",
},
plugins: [
"expo-router",
[
"expo-splash-screen",
{
image: "./lib/assets/images/splash-icon.png",
imageWidth: 200,
resizeMode: "contain",
backgroundColor: "#ffffff",
},
],
"expo-secure-store",
"@react-native-firebase/app",
[
"expo-build-properties",
{
android: {
useLegacyPackaging: true,
ndkVersion: "26.1.10909125",
},
ios: {
useFrameworks: "static",
},
},
],
"expo-localization",
],
experiments: {
typedRoutes: true,
},
extra: {
APP_VARIANT: process.env.APP_VARIANT,
router: {
origin: false,
},
eas: {
projectId: "eb2d5c02-2391-45c4-9ae5-8f0702d7d37b",
},
},
runtimeVersion: {
policy: "appVersion",
},
updates: {
url: "https://u.expo.dev/f4ae319b-dd4f-4dde-96eb-61a40a5d5607",
},
owner: "rn-starter-kit",
};
};