-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.config.js
More file actions
56 lines (45 loc) · 1.08 KB
/
Copy pathapp.config.js
File metadata and controls
56 lines (45 loc) · 1.08 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
const IS_DEV = process.env.APP_VARIANT === 'development';
const IS_PREVIEW = process.env.APP_VARIANT === 'preview';
const getUniqueIdentifier = () => {
if (IS_DEV) {
return 'com.pavelpotocek.activitytracker.dev';
}
if (IS_PREVIEW) {
return 'com.pavelpotocek.activitytracker.preview';
}
return 'com.pavelpotocek.activitytracker';
};
const getAppName = () => {
if (IS_DEV) {
return 'Activities (Dev)';
}
if (IS_PREVIEW) {
return 'Activities';
}
return 'Activities';
};
const getIconBackground = () => {
if (IS_DEV) {
return '#4d4d4d';
} else if (IS_PREVIEW) {
return '#303f9f';
} else {
return '#7166ff';
}
};
export default ({ config }) => ({
...config,
name: getAppName(),
ios: {
...config.ios,
bundleIdentifier: getUniqueIdentifier(),
},
android: {
...config.android,
package: getUniqueIdentifier(),
adaptiveIcon: {
...config.android.adaptiveIcon,
backgroundColor: getIconBackground(),
},
},
});