-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.config.ts
74 lines (69 loc) · 1.9 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
import type { ExpoConfig } from 'expo/config';
import type { BUILD_ENV_TYPE } from './src/utils/env';
const splashScreenBG = '#2e3c4b';
export default (): ExpoConfig => {
const buildEnv = (process.env.RN_APP_BUILD_ENV || 'debug') as BUILD_ENV_TYPE;
const buildVersion = '1.0.0';
const getIdentifier = () => {
let str = 'com.company.rndemo';
if (buildEnv === 'release') return str;
return `${str}.${buildEnv}`;
};
return {
name: 'RN-demo',
slug: 'RN-demo',
version: buildVersion,
orientation: 'portrait',
icon: './src/assets/app_icon.png',
userInterfaceStyle: 'light',
backgroundColor: splashScreenBG,
splash: {
image: './src/assets/app_splash.png',
resizeMode: 'contain',
backgroundColor: splashScreenBG,
},
assetBundlePatterns: ['**/*'],
ios: {
supportsTablet: true,
bundleIdentifier: getIdentifier(),
infoPlist: {
NSCameraUsageDescription: '需要访问您的相机来拍照',
NSPhotoLibraryUsageDescription: '需要访问您的照片库来保存照片',
},
},
android: {
package: getIdentifier(),
adaptiveIcon: {
foregroundImage: './src/assets/app_adaptive_icon.png',
backgroundColor: '#ffffff',
},
permissions: ['CAMERA', 'READ_EXTERNAL_STORAGE', 'WRITE_EXTERNAL_STORAGE'],
},
androidNavigationBar: {
backgroundColor: splashScreenBG,
},
experiments: {
tsconfigPaths: true,
},
extra: {
buildEnv,
},
updates: {
enabled: true,
useClassicUpdates: true,
},
plugins: [
['./plugins/expo-withAndroidQueries.js'],
[
'app-icon-badge',
{
enabled: buildEnv !== 'release',
badges: [
{ text: buildEnv, type: 'banner', color: 'white' },
{ text: buildVersion, type: 'ribbon', color: 'white' },
],
},
],
],
};
};