-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathapp.config.ts
More file actions
308 lines (299 loc) · 7.57 KB
/
app.config.ts
File metadata and controls
308 lines (299 loc) · 7.57 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
import "ts-node/register"
import type { ExpoConfig, ConfigContext } from "expo/config"
export const VERSION: string = "3.0.35"
export const APPLE_TEAM_ID: string = "7YTW5D2K7P"
export const IOS_APP_GROUP_ID: string = "group.io.filen.app"
export const JS_ENGINE: "hermes" | "jsc" = "hermes"
export const NEW_ARCH_ENABLED: boolean = true
export const ANDROID_MIN_SDK_VERSION: number = 31
export const ANDROID_TARGET_SDK_VERSION: number = 36
export const ANDROID_COMPILE_SDK_VERSION: number = 36
export const ANDROID_BUILD_TOOLS_VERSION: string = "36.0.0"
export const IOS_DEPLOYMENT_TARGET: string = "16.0"
export const NAME: string = "Filen"
export const IDENTIFIER: string = "io.filen.app"
export function semverToNumber(version: string): number {
const parts = version.replace(/^v/, "").split(".").map(Number)
while (parts.length < 3) {
parts.push(0)
}
const [major, minor, patch] = parts
if (
typeof major !== "number" ||
typeof minor !== "number" ||
typeof patch !== "number" ||
parts.some(part => isNaN(part) || part < 0 || part > 999)
) {
throw new Error(`Invalid semver format: ${version}`)
}
return major * 1000000 + minor * 1000 + patch
}
export const BUILD_NUMBER: number = semverToNumber(VERSION)
export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
name: NAME,
slug: "filen-mobile",
version: VERSION,
orientation: "default",
icon: "./assets/images/icon.png",
scheme: "iofilenapp",
userInterfaceStyle: "automatic",
newArchEnabled: NEW_ARCH_ENABLED,
jsEngine: JS_ENGINE,
platforms: ["ios", "android"],
githubUrl: "https://github.com/FilenCloudDienste/filen-mobile",
ios: {
buildNumber: BUILD_NUMBER.toString(),
version: VERSION,
supportsTablet: true,
bundleIdentifier: IDENTIFIER,
requireFullScreen: true,
usesIcloudStorage: true,
newArchEnabled: NEW_ARCH_ENABLED,
jsEngine: JS_ENGINE,
appleTeamId: APPLE_TEAM_ID,
entitlements: {
"com.apple.security.application-groups": [IOS_APP_GROUP_ID]
},
config: {
usesNonExemptEncryption: false
},
infoPlist: {
UIBackgroundModes: ["audio", "fetch", "processing"],
NSAppTransportSecurity: {
NSAllowsLocalNetworking: true,
NSAllowsArbitraryLoads: false
},
LSApplicationCategoryType: "public.app-category.productivity",
UIRequiredDeviceCapabilities: ["arm64"],
// Localization
CFBundleAllowMixedLocalizations: true,
CFBundleLocalizations: [
"en",
"de",
"fr",
"id",
"it",
"ja",
"ko",
"nl",
"no",
"pl",
"pt",
"ro",
"ru",
"sv",
"th",
"uk",
"ur",
"vi",
"zh",
"es",
"hi",
"hu",
"cs",
"da",
"bn",
"fi",
"he"
],
CFBundleDevelopmentRegion: "en",
UIPrefersShowingLanguageSettings: true
},
icon: {
dark: "./assets/images/ios-dark.png",
light: "./assets/images/ios-light.png",
tinted: "./assets/images/ios-tinted.png"
},
privacyManifests: {
NSPrivacyTracking: false
}
},
android: {
version: VERSION,
versionCode: BUILD_NUMBER,
edgeToEdgeEnabled: true,
newArchEnabled: NEW_ARCH_ENABLED,
jsEngine: JS_ENGINE,
allowBackup: false,
adaptiveIcon: {
foregroundImage: "./assets/images/adaptive-icon.png",
backgroundColor: "#ffffff"
},
package: IDENTIFIER,
permissions: [
"INTERNET",
"ACCESS_NETWORK_STATE",
"ACCESS_WIFI_STATE",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE",
"CAMERA",
"RECORD_AUDIO",
"READ_MEDIA_IMAGES",
"READ_MEDIA_VIDEO",
"READ_MEDIA_AUDIO",
"ACCESS_MEDIA_LOCATION",
"WAKE_LOCK",
"RECEIVE_BOOT_COMPLETED",
"VIBRATE",
"POST_NOTIFICATIONS",
"FOREGROUND_SERVICE",
"USE_FINGERPRINT",
"USE_BIOMETRIC",
"SYSTEM_ALERT_WINDOW",
"ACTION_OPEN_DOCUMENT",
"ACTION_OPEN_DOCUMENT_TREE"
]
},
plugins: [
"expo-router",
"react-native-bottom-tabs",
[
"expo-build-properties",
{
android: {
compileSdkVersion: ANDROID_COMPILE_SDK_VERSION,
targetSdkVersion: ANDROID_TARGET_SDK_VERSION,
minSdkVersion: ANDROID_MIN_SDK_VERSION,
buildToolsVersion: ANDROID_BUILD_TOOLS_VERSION,
enableProguardInReleaseBuilds: false,
enableShrinkResourcesInReleaseBuilds: false,
enableBundleCompression: false,
useLegacyPackaging: false,
enablePngCrunchInReleaseBuilds: false,
packagingOptions: {
pickFirst: ["**/libcrypto.so"]
}
},
ios: {
deploymentTarget: IOS_DEPLOYMENT_TARGET,
useFrameworks: "static"
}
}
],
"expo-localization",
[
"expo-screen-orientation",
{
initialOrientation: "DEFAULT"
}
],
[
"expo-video",
{
supportsBackgroundPlayback: false,
supportsPictureInPicture: false
}
],
[
"expo-audio",
{
microphonePermission: "Please allow access to your microphone so that Filen can capture audio when recording videos."
}
],
[
"expo-media-library",
{
photosPermission: "Please allow access to your camera so that Filen can upload photos you take inside the app.",
savePhotosPermission: "Please allow access to your photo library so that Filen can save photos on your device.",
isAccessMediaLocationEnabled: true
}
],
[
"expo-document-picker",
{
iCloudContainerEnvironment: "Production"
}
],
[
"expo-image-picker",
{
photosPermission: "Please allow access to your photos so that Filen can back them up automatically.",
cameraPermission: "Please allow access to your camera so that Filen can take photos.",
microphonePermission: "Please allow access to your microphone so that Filen can capture audio when recording videos."
}
],
[
"expo-local-authentication",
{
faceIDPermission: "Please allow Filen to use FaceID or TouchID to lock itself."
}
],
"expo-background-task",
"@config-plugins/react-native-blob-util",
"./plugins/withAndroidNetworkSecurityConfig",
"./plugins/withAndroidLargeHeapAndHardwareAcceleration",
[
"./plugins/withAndroidArchitectures",
{
architectures: "arm64-v8a,x86_64"
}
],
[
"expo-share-intent",
{
iosActivationRules: {
NSExtensionActivationSupportsWebURLWithMaxCount: 0,
NSExtensionActivationSupportsWebPageWithMaxCount: 0,
NSExtensionActivationSupportsImageWithMaxCount: 10000,
NSExtensionActivationSupportsMovieWithMaxCount: 10000,
NSExtensionActivationSupportsFileWithMaxCount: 10000,
NSExtensionActivationSupportsText: false
},
androidIntentFilters: ["*/*"],
androidMultiIntentFilters: ["*/*"],
iosShareExtensionName: "FilenShareIntentExtension",
iosAppGroupIdentifier: IOS_APP_GROUP_ID,
developmentTeamId: APPLE_TEAM_ID
}
],
"expo-font",
[
"expo-splash-screen",
{
backgroundColor: "#FFFFFF",
image: "./assets/images/splash-icon.png",
dark: {
image: "./assets/images/splash-icon-dark.png",
backgroundColor: "#000000"
},
imageWidth: 128
}
],
[
"./plugins/withFileProvider.ts",
{
crateName: "filen-mobile-native-cache",
libName: "filen_mobile_native_cache",
targets: ["aarch64-apple-ios", "aarch64-apple-ios-sim"],
cargoArgs: "-F heif-decoder",
developmentTeamId: APPLE_TEAM_ID,
iosAppGroupIdentifier: IOS_APP_GROUP_ID
}
],
[
"./plugins/withAndroidRustBuild.ts",
{
crateName: "filen-mobile-native-cache",
libName: "filen_mobile_native_cache",
targets: ["x86_64", "arm64-v8a"],
cargoArgs: "-F heif-decoder"
}
],
"./plugins/withAndroidSigning",
"./plugins/withGradleMemory",
"./plugins/withAndroidLocaleConfig"
],
experiments: {
typedRoutes: true,
reactCompiler: true
},
extra: {
eas: {
projectId: "fbb9c3db-70ea-4b27-99c3-fbef432ceb2d"
},
router: {
origin: false
}
}
})