-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.config.ts
55 lines (51 loc) · 1.49 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
import { ConfigContext, ExpoConfig } from 'expo/config'
export default ({ config: initConfig }: ConfigContext): ExpoConfig => {
const appName = initConfig?.name || 'Skeleton'
const environment = process.env.EXPO_PUBLIC_NODE_ENV as 'production' | 'development' | 'testing'
const projectId = process.env.EXPO_PUBLIC_EAS_PROJECT_ID
const name = {
production: appName,
testing: `${appName} Testing`,
development: `${appName} Development`,
}[environment]
const bundleIdentifier = environment === 'testing' ? 'com.skeleton.test' : 'com.skeleton'
return {
...initConfig,
name,
slug: initConfig?.slug || 'skeleton',
userInterfaceStyle: environment === 'development' ? 'dark' : 'automatic',
ios: {
...initConfig.ios,
bundleIdentifier,
usesAppleSignIn: true,
requireFullScreen: true,
googleServicesFile: process.env.GOOGLE_SERVICE_FILE_IOS || './GoogleService-Info.plist',
config: {
googleMapsApiKey: process.env.GOOGLE_MAPS_API_KEY_IOS,
usesNonExemptEncryption: false,
},
infoPlist: {
UIBackgroundModes: ['remote-notification', 'processing'],
},
},
android: {
...initConfig.android,
package: bundleIdentifier,
googleServicesFile: process.env.GOOGLE_SERVICE_FILE_ANDROID || './google-services.json',
config: {
googleMaps: { apiKey: process.env.GOOGLE_MAPS_API_KEY_ANDROID },
},
},
updates: {
url: `https://u.expo.dev/${projectId}`,
},
runtimeVersion: {
policy: 'appVersion',
},
extra: {
eas: {
projectId,
},
},
}
}