-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.config.ts
91 lines (87 loc) · 2 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
import { ConfigContext, ExpoConfig } from '@expo/config'
export default ({ config }: ConfigContext): ExpoConfig => {
/*
We can't use utils/constants/environment here because it's not available
It will produce an expo error "Error reading Expo config", so we'll grab the
env from the process environment directly
*/
const Env = process.env.APP_ENV
const isProd = Env === 'production'
const isStaging = Env === 'test' || Env === 'staging'
if (isProd) {
return {
...config,
name: 'Starter',
slug: 'starter',
ios: {
...config.ios,
bundleIdentifier: 'app.expo.starter'
},
android: {
...config.android,
package: 'app.expo.starter'
},
updates: {
...config.updates,
// Todo - drop in project id / url here
url: 'https://u.expo.dev/'
},
extra: {
eas: {
// Todo - drop in project id / url here
projectId: ''
}
}
}
}
if (isStaging) {
return {
...config,
name: '[Staging] Starter',
slug: 'starter-staging',
ios: {
...config.ios,
bundleIdentifier: 'app.expo.starter.staging'
},
android: {
...config.android,
package: 'app.expo.starter.staging'
},
updates: {
...config.updates,
// Todo - drop in project id / url here
url: 'https://u.expo.dev/'
},
extra: {
eas: {
// Todo - drop in project id / url here
projectId: ''
}
}
}
}
return {
...config,
name: '[Dev] Starter',
slug: 'starter-dev',
ios: {
...config.ios,
bundleIdentifier: 'app.expo.starter.dev'
},
android: {
...config.android,
package: 'app.expo.starter.dev'
},
updates: {
...config.updates,
// Todo - drop in project id / url here
url: ''
},
extra: {
eas: {
// Todo - drop in project id / url here
projectId: ''
}
}
}
}