-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.config.ts
120 lines (113 loc) · 3.5 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
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
// https://docs.expo.dev/guides/typescript/#appconfigjs
import { type ExpoConfig } from '@expo/config';
import 'ts-node/register';
import { getConfig } from './config/utils';
/** ------------------------- NOTE: -------------------------
* Do not commit `console.log` statements in this file!!!
* It will break android builds because of the way we Expo resolves
* the `index.tsx` file during the build process...
------------------------------------------------------------ */
const env = process.env.APP_ENV || 'dev';
const config = getConfig(env);
const appId = `com.taito.template${config.appIdSuffix ?? ''}`;
const expoConfig: ExpoConfig = {
slug: 'taito-template',
name: 'Taito Template', // eslint-disable-line lingui/no-unlocalized-strings
scheme: config.scheme,
owner: 'taito-united',
version: '0.0.1',
orientation: 'portrait',
jsEngine: 'hermes',
platforms: ['ios', 'android', 'web'], // Remove web if you don't need to support it
icon: config.iconImage,
newArchEnabled: true,
backgroundColor: '#000000', // root view background
userInterfaceStyle: 'automatic',
android: {
package: appId,
playStoreUrl: config.playStoreUrl,
adaptiveIcon: {
foregroundImage: config.adaptiveIcon.foregroundImage,
backgroundColor: config.adaptiveIcon.backgroundColor,
},
// Add more Android permissions here
permissions: ['VIBRATE'],
},
ios: {
bundleIdentifier: appId,
supportsTablet: true, // Change this if your app supports tablets
appStoreUrl: config.appStoreUrl,
bitcode: false,
},
// Remove the `web` entry if you don't need to support it
web: {
bundler: 'metro',
output: 'static',
favicon: config.iconImage,
},
extra: {
...config,
eas: {
projectId: '808dbf9f-9986-4409-a52d-050e69d62397',
},
},
updates: {
url: 'https://u.expo.dev/808dbf9f-9986-4409-a52d-050e69d62397',
},
// This is important for OTA updates to work properly!
// https://docs.expo.dev/eas-update/runtime-versions/#fingerprint-runtime-version-policy
runtimeVersion: {
policy: 'fingerprint',
},
plugins: [
'expo-router',
'expo-localization',
['expo-updates', { username: 'taito-united' }],
[
'expo-font',
{
fonts: [
'./src/design-system/fonts/Inter-Bold.ttf',
'./src/design-system/fonts/Inter-Medium.ttf',
'./src/design-system/fonts/Inter-Regular.ttf',
'./src/design-system/fonts/Inter-SemiBold.ttf',
],
},
],
[
'expo-splash-screen',
{
backgroundColor: config.splash.backgroundColor,
image: config.splash.image,
resizeMode: 'contain',
// Uncomment to add splash screen dark mode
// dark: {
// image: config.splash.darkImage,
// backgroundColor: config.splash.darkBackgroundColor
// },
},
],
[
'react-native-permissions',
{
// Add setup_permissions to your Podfile
iosPermissions: [],
},
],
['./plugins/with-ios-settings', { teamId: 'EPATC4S9N2' }],
[
'expo-build-properties',
{ android: { extraProguardRules: getExtraProguardRules() } },
],
],
};
// NOTE: we can't inline this to the plugin definition because the indendation would be wrong
function getExtraProguardRules() {
// eslint-disable-next-line lingui/no-unlocalized-strings
return `
# react-native-date-picker
-keep public class net.time4j.android.ApplicationStarter
-keep public class net.time4j.PrettyTime
`;
}
export default expoConfig;