-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.config.js
132 lines (126 loc) · 4.19 KB
/
app.config.js
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* eslint-disable max-len */
import dotenv from 'dotenv';
dotenv.config();
const ENVIRONMENT_VARIABLES = {
BASE_URL_LOCAL: process.env.BASE_URL_LOCAL,
BASE_URL_DEV: process.env.BASE_URL_DEV,
BASE_URL_STAGING: process.env.BASE_URL_STAGING,
BASE_URL_PROD: process.env.BASE_URL_PROD,
WEBAPP_URL_LOCAL: process.env.WEBAPP_URL_LOCAL,
WEBAPP_URL_DEV: process.env.WEBAPP_URL_DEV,
WEBAPP_URL_STAGING: process.env.WEBAPP_URL_STAGING,
WEBAPP_URL_PROD: process.env.WEBAPP_URL_PROD,
PROFILE: process.env.PROFILE,
SENTRY_KEY: process.env.SENTRY_KEY,
TEST_EMAILS: process.env.TEST_EMAILS,
TEST_IDS: process.env.TEST_IDS,
PLATFORM: process.env.PLATFORM,
SINGLE_COURSES_SUBPROGRAM_IDS: process.env.SINGLE_COURSES_SUBPROGRAM_IDS,
};
const LOCAL = 'local';
const DEVELOPMENT = 'development';
const PRODUCTION = 'production';
const getVariables = () => {
switch (process.env.PROFILE) {
case LOCAL:
return { appName: 'Compani - local', bundleIdentifier: 'com.alenvi.compani.local' };
case DEVELOPMENT:
return { appName: 'Compani - Dev', bundleIdentifier: 'com.alenvi.compani.dev' };
case PRODUCTION:
return { appName: 'Compani', bundleIdentifier: 'com.alenvi.compani' };
default:
return 'Compani';
}
};
const variables = getVariables();
export default {
expo: {
name: variables.appName,
slug: 'compani',
description: 'Nous aidons les intervenants, les managers du secteur et les dirigeants à pratiquer un accompagnement humain',
platforms: ['ios', 'android', 'web'],
version: '2.31.0',
orientation: 'portrait',
primaryColor: '#005774',
icon: './assets/images/ios_icon.png',
backgroundColor: '#FFFFFF',
splash: {
image: './assets/images/splash.png',
resizeMode: 'cover',
backgroundColor: '#FFFFFF',
},
assetBundlePatterns: ['assets/images/*'],
extra: {
...ENVIRONMENT_VARIABLES,
eas: {
projectId: process.env.PROJECT_ID,
},
},
updates: {
enabled: true,
checkAutomatically: 'ON_LOAD',
fallbackToCacheTimeout: 3000,
url: 'https://u.expo.dev/861a9cc8-74bd-4278-9bad-783086e74994',
},
runtimeVersion: {
policy: 'appVersion',
},
notification: {
icon: './assets/images/android_notification_icon.png',
color: '#005774',
},
ios: {
buildNumber: '2.31.0',
bundleIdentifier: variables.bundleIdentifier,
requireFullScreen: true,
icon: './assets/images/ios_icon.png',
infoPlist: {
NSCameraUsageDescription: 'Autorisez l\'accès à votre caméra pour pouvoir prendre une photo et la charger comme photo de profil dans Compani.',
NSPhotoLibraryUsageDescription: 'Autorisez l\'accès à votre librairie pour pouvoir choisir une photo et la charger comme photo de profil dans Compani.',
},
privacyManifests: {
NSPrivacyAccessedAPITypes: [
{
NSPrivacyAccessedAPIType: 'NSPrivacyAccessedAPICategoryFileTimestamp',
NSPrivacyAccessedAPITypeReasons: ['3B52.1'],
},
{
NSPrivacyAccessedAPIType: 'NSPrivacyAccessedAPICategoryDiskSpace',
NSPrivacyAccessedAPITypeReasons: ['E174.1'],
},
],
},
},
android: {
package: variables.bundleIdentifier,
googleServicesFile: './google-services.json',
permissions: ['CAMERA', 'READ_EXTERNAL_STORAGE', 'WRITE_EXTERNAL_STORAGE'],
icon: './assets/images/android_icon_old.png',
adaptiveIcon: {
foregroundImage: './assets/images/android_icon.png',
backgroundColor: '#005774',
},
versionCode: 250,
},
web: {
favicon: './assets/images/android_icon_old.png',
},
plugins: [
[
'expo-build-properties',
{
ios: { useFrameworks: 'static' },
android: {
enableProguardInReleaseBuilds: true,
enableShrinkResourcesInReleaseBuilds: true,
extraProguardRules: '-keep public class com.horcrux.svg.** {*;}',
},
},
],
['expo-dev-launcher', { launchMode: 'launcher' }],
['@sentry/react-native/expo', { organization: 'alenvi', project: 'mobile' }],
'expo-font',
'expo-asset',
],
},
};