-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapp.config.ts
More file actions
141 lines (135 loc) · 4.05 KB
/
Copy pathapp.config.ts
File metadata and controls
141 lines (135 loc) · 4.05 KB
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
import { ExpoConfig } from '@expo/config';
import { EASConfig } from 'expo-manifests';
import { AppEnv } from '../../libs/shared/utils/app-env/src/env';
import { AppEnvName } from '../../libs/shared/utils/app-env/src/app-env';
import { compact } from 'lodash-es';
const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig } & typeof extra } => {
const projectId = process.env.EXPO_PUBLIC_PROJECT_ID;
const appEnv = new AppEnv((process.env.EXPO_PUBLIC_APP_ENV as AppEnvName) || 'development');
const appId = process.env.EXPO_PUBLIC_APP_ID;
const googleAuthIosUrlScheme = process.env.GOOGLE_IOS_URL_SCHEME;
const extra = {
eas: { projectId } as EASConfig,
googleIosClientId: appEnv.select({
default: process.env.GOOGLE_IOS_CLIENT_ID_DEV,
production: process.env.GOOGLE_IOS_CLIENT_ID_PROD,
}),
isInternalRelease: process.env.EXPO_PUBLIC_IS_INTERNAL_RELEASE,
googleSignInRoute: process.env.GOOGLE_SIGN_IN_ROUTE,
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return {
name: process.env.EXPO_PUBLIC_APP_NAME,
slug: process.env.EXPO_PUBLIC_APP_SLUG as string,
scheme: process.env.EXPO_PUBLIC_APP_SCHEME as string,
owner: process.env.EXPO_PUBLIC_APP_OWNER as string,
version: '1.5.0',
orientation: 'portrait',
icon: './assets/icon.png',
runtimeVersion: '1.5.0',
experiments: {
reactCompiler: true,
},
updates: {
url: `https://u.expo.dev/${projectId}`,
},
ios: {
bundleIdentifier: appId,
supportsTablet: false,
buildNumber: appEnv.select({
default: '18',
production: '24',
}),
config: {
usesNonExemptEncryption: false,
},
},
android: {
package: appId,
versionCode: appEnv.select({
default: 15,
production: 24,
}),
adaptiveIcon: {
foregroundImage: './assets/adaptive-icon.png',
backgroundColor: '#FFFFFF',
},
},
web: {
bundler: 'metro',
},
plugins: compact([
'expo-router',
'expo-localization',
'expo-asset',
[
'expo-splash-screen',
{
image: './assets/splash.png',
backgroundColor: '#ffffff',
imageWidth: 100,
dark: {
image: './assets/splash-dark.png',
backgroundColor: '#000000',
},
},
],
[
'expo-image-picker',
{
photosPermission:
'Open MobileUI uses your photo library to let you select and share images in chat conversations and set your profile picture.',
cameraPermission:
'Open MobileUI uses your camera to let you take photos and share them directly in chat conversations.',
},
],
[
'expo-media-library',
{
savePhotosPermission:
'Open MobileUI saves photos to your library when you download images shared in chat conversations.',
},
],
[
'expo-audio',
{
microphonePermission:
'Open MobileUI uses your microphone to let you record and send voice messages in chat conversations.',
},
],
[
'expo-build-properties',
{
android: {
androidGradlePluginVersion: '8.3.2',
compileSdkVersion: 35,
targetSdkVersion: 35,
buildToolsVersion: '35.0.0',
ndkVersion: '27.1.12297006',
packagingOptions: {
jniLibs: {
useLegacyPackaging: false,
},
},
},
ios: {
useFrameworks: 'static',
},
},
],
googleAuthIosUrlScheme
? [
'@react-native-google-signin/google-signin',
{
iosUrlScheme: googleAuthIosUrlScheme,
},
]
: null,
['./plugins/with-remove-media-playback-permission'],
]),
newArchEnabled: true,
extra,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any;
};
export default createConfig;