-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.config.ts
80 lines (75 loc) · 1.73 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
import { ExpoConfig, ConfigContext } from 'expo/config';
export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
name: getAppName(),
slug: 'olatuak',
scheme: 'olatuak',
version: '1.0.2',
orientation: 'portrait',
icon: getAppIcon(),
userInterfaceStyle: 'light',
splash: {
image: './assets/splash.png',
resizeMode: 'contain',
backgroundColor: '#2a2c37',
},
assetBundlePatterns: ['**/*'],
ios: {
buildNumber: '2',
supportsTablet: true,
bundleIdentifier: getBundleName(),
},
android: {
versionCode: 2,
adaptiveIcon: {
foregroundImage: './assets/adaptive-icon.png',
backgroundColor: '#2a2c37',
},
package: getBundleName(),
},
web: {
favicon: './assets/favicon.png',
},
extra: {
appVariant: process.env.APP_VARIANT,
eas: {
projectId: 'c4c58d88-f165-44f8-9ee0-0cb5f0666486',
},
},
runtimeVersion: {
policy: 'appVersion',
},
updates: {
url: 'https://u.expo.dev/c4c58d88-f165-44f8-9ee0-0cb5f0666486',
},
});
const getAppName = () => {
switch (process.env.APP_VARIANT) {
case 'development':
return 'Olatuak (dev)';
case 'staging':
return 'Olatuak (staging)';
default:
return 'Olatuak';
}
};
const getAppIcon = () => {
switch (process.env.APP_VARIANT) {
case 'development':
return './assets/icon-dev.png';
case 'staging':
return './assets/icon-staging.png';
default:
return './assets/icon.png';
}
};
const getBundleName = () => {
switch (process.env.APP_VARIANT) {
case 'development':
return 'com.bdevaublanc.olatuak.dev';
case 'staging':
return 'com.bdevaublanc.olatuak.staging';
default:
return 'com.bdevaublanc.olatuak';
}
};