-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.config.js
150 lines (145 loc) · 4.51 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
import commonConfig from 'common/config';
import * as dotenv from 'dotenv';
dotenv.config();
const bundleId = commonConfig.bundleIds[process.env.ENVIRONMENT];
const names = {
development: 'Utah Roadkill Dev',
staging: 'Utah Roadkill Staging',
production: 'Utah Roadkill',
};
const name = names[process.env.ENVIRONMENT];
// perhaps this bump could be automated using a combo of app.config.json and this file?
const buildNumber = 645;
export default {
name,
slug: 'wildlife-vehicle-collision-reporter', // changing this may result in new signing keys being generated (https://forums.expo.dev/t/changed-app-json-slug-and-android-build-keys-changed-can-i-get-them-back/9927/3)
description:
'A mobile application for reporting and removing roadkill in Utah.',
owner: 'ugrc',
scheme: bundleId,
githubUrl: 'https://github.com/agrc/roadkill-mobile',
version: '3.0.10',
orientation: 'portrait',
icon:
process.env.ENVIRONMENT === 'production'
? './assets/icon.png'
: `./assets/icon_${process.env.ENVIRONMENT}.png`,
splash: {
image:
process.env.ENVIRONMENT === 'production'
? './assets/splash.png'
: `./assets/splash_${process.env.ENVIRONMENT}.png`,
resizeMode: 'contain',
backgroundColor: '#ffffff',
},
assetBundlePatterns: ['**/*'],
jsEngine: 'hermes',
ios: {
bundleIdentifier: bundleId,
googleServicesFile: process.env.GOOGLE_SERVICES_IOS,
buildNumber: buildNumber.toString(),
supportsTablet: true,
config: {
usesNonExemptEncryption: false,
googleMapsApiKey: process.env.GOOGLE_MAPS_API_KEY_IOS,
},
infoPlist: {
NSLocationAlwaysUsageDescription:
'The app uses your location in the background for tracking routes. *Note* this is only applicable for agency employees or contractors. Background location is not used for public users.',
NSLocationWhenInUseUsageDescription:
'The app uses your location to help record the location of the animal that you are reporting.',
UIBackgroundModes: ['location'],
},
},
android: {
package: bundleId,
googleServicesFile: process.env.GOOGLE_SERVICES_ANDROID,
versionCode: buildNumber,
softwareKeyboardLayoutMode: 'pan',
adaptiveIcon: {
foregroundImage:
process.env.ENVIRONMENT === 'production'
? './assets/adaptive-icon.png'
: `./assets/adaptive-icon_${process.env.ENVIRONMENT}.png`,
backgroundColor: '#FFFFFF',
},
permissions: [
'ACCESS_FINE_LOCATION',
'ACCESS_COARSE_LOCATION',
'ACCESS_BACKGROUND_LOCATION',
'FOREGROUND_SERVICE',
'READ_EXTERNAL_STORAGE',
'WRITE_EXTERNAL_STORAGE',
],
config: {
googleMaps: {
apiKey: process.env.GOOGLE_MAPS_API_KEY_ANDROID,
},
},
},
plugins: [
// [
// 'expo-location',
// {
// isAndroidBackgroundLocationEnabled: true,
// isIosBackgroundLocationEnabled: true,
// isAndroidForegroundServiceEnabled: true,
// isIosForegroundServiceEnabled: true,
// },
// ],
'expo-apple-authentication',
[
'@sentry/react-native/expo',
{
organization: 'utah-ugrc',
project: 'roadkill',
},
],
'expo-notifications',
[
'expo-image-picker',
{
photosPermission:
'The app accesses to your photos to allow you to submit a photo of the animal.',
cameraPermission:
'The app accesses your camera to allow you to capture and submit a photo of the animal.',
},
],
[
'react-native-fbsdk-next',
{
appID: process.env.FACEBOOK_OAUTH_CLIENT_ID,
clientToken: process.env.FACEBOOK_OAUTH_CLIENT_TOKEN,
displayName: `${name} Reporter`,
scheme: `fb${process.env.FACEBOOK_OAUTH_CLIENT_ID}`,
},
],
[
'expo-build-properties',
{
ios: {
useFrameworks: 'static',
},
},
],
'@react-native-firebase/app',
],
extra: {
eas: {
projectId: '648c99de-696c-4704-8723-7f8838dc6896',
},
ENVIRONMENT: process.env.ENVIRONMENT,
GOOGLE_OAUTH_CLIENT_ID_ANDROID: process.env.GOOGLE_OAUTH_CLIENT_ID_ANDROID,
GOOGLE_OAUTH_CLIENT_ID_IOS: process.env.GOOGLE_OAUTH_CLIENT_ID_IOS,
API: process.env.API,
CLIENT_ID: process.env.CLIENT_ID,
APP_QUAD_WORD: process.env.APP_QUAD_WORD,
},
/* required for eas update command
bump major version when upgrading expo version
*/
runtimeVersion: '3.1.0',
updates: {
url: 'https://u.expo.dev/648c99de-696c-4704-8723-7f8838dc6896',
},
};