forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1const pkg = require('./package.json')
2
3module.exports = function (_config) {
4 /**
5 * App version number. Should be incremented as part of a release cycle.
6 */
7 const VERSION = pkg.version
8
9 /**
10 * Uses built-in Expo env vars
11 *
12 * @see https://docs.expo.dev/build-reference/variables/#built-in-environment-variables
13 */
14 const PLATFORM = process.env.EAS_BUILD_PLATFORM ?? 'web'
15
16 const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
17 const IS_PRODUCTION = process.env.EXPO_PUBLIC_ENV === 'production'
18 const IS_DEV = !IS_TESTFLIGHT || !IS_PRODUCTION
19
20 const ASSOCIATED_DOMAINS = [
21 'applinks:witchsky.app',
22 // When testing local services, enter an ngrok (et al) domain here. It must use a standard HTTP/HTTPS port.
23 ...(IS_DEV || IS_TESTFLIGHT ? [] : []),
24 ]
25
26 // const UPDATES_CHANNEL = IS_TESTFLIGHT
27 // ? 'testflight'
28 // : IS_PRODUCTION
29 // ? 'production'
30 // : undefined
31 // const UPDATES_ENABLED = !!UPDATES_CHANNEL
32 const UPDATES_ENABLED = IS_TESTFLIGHT || IS_PRODUCTION
33
34 const USE_SENTRY = Boolean(process.env.SENTRY_AUTH_TOKEN)
35
36 return {
37 expo: {
38 version: VERSION,
39 name: 'Witchsky',
40 slug: 'witchsky',
41 scheme: ['bluesky', 'witchsky'],
42 // owner: 'blueskysocial',
43 // owner: 'neema.brown',
44 runtimeVersion: {
45 policy: 'appVersion',
46 },
47 icon: './assets/app-icons/ios_icon_default_next.png',
48 userInterfaceStyle: 'automatic',
49 primaryColor: '#ED5345',
50 newArchEnabled: false,
51 ios: {
52 supportsTablet: false,
53 bundleIdentifier: 'app.witchsky',
54 config: {
55 usesNonExemptEncryption: false,
56 },
57 icon:
58 PLATFORM === 'web' // web build doesn't like .icon files
59 ? './assets/app-icons/ios_icon_default_next.png'
60 : './assets/app-icons/ios_icon_default.icon',
61 infoPlist: {
62 UIBackgroundModes: ['remote-notification'],
63 NSCameraUsageDescription:
64 'Used for profile pictures, skeets, and other kinds of content.',
65 NSMicrophoneUsageDescription:
66 'Used for skeets and other kinds of content.',
67 NSPhotoLibraryAddUsageDescription:
68 'Used to save images to your library.',
69 NSPhotoLibraryUsageDescription:
70 'Used for profile pictures, skeets, and other kinds of content',
71 CFBundleSpokenName: 'witchsky.app',
72 CFBundleLocalizations: [
73 'en',
74 'an',
75 'ast',
76 'ca',
77 'cy',
78 'da',
79 'de',
80 'el',
81 'eo',
82 'es',
83 'eu',
84 'fi',
85 'fr',
86 'fy',
87 'ga',
88 'gd',
89 'gl',
90 'hi',
91 'hu',
92 'ia',
93 'id',
94 'it',
95 'ja',
96 'km',
97 'ko',
98 'ne',
99 'nl',
100 'pl',
101 'pt-BR',
102 'pt-PT',
103 'ro',
104 'ru',
105 'sv',
106 'th',
107 'tr',
108 'uk',
109 'vi',
110 'yue',
111 'zh-Hans',
112 'zh-Hant',
113 ],
114 UIDesignRequiresCompatibility: true,
115 },
116 associatedDomains: ASSOCIATED_DOMAINS,
117 entitlements: {
118 'com.apple.developer.kernel.increased-memory-limit': true,
119 'com.apple.developer.kernel.extended-virtual-addressing': true,
120 'com.apple.security.application-groups': 'group.app.witchsky',
121 },
122 privacyManifests: {
123 NSPrivacyCollectedDataTypes: [
124 {
125 NSPrivacyCollectedDataType: 'NSPrivacyCollectedDataTypeCrashData',
126 NSPrivacyCollectedDataTypeLinked: false,
127 NSPrivacyCollectedDataTypeTracking: false,
128 NSPrivacyCollectedDataTypePurposes: [
129 'NSPrivacyCollectedDataTypePurposeAppFunctionality',
130 ],
131 },
132 {
133 NSPrivacyCollectedDataType:
134 'NSPrivacyCollectedDataTypePerformanceData',
135 NSPrivacyCollectedDataTypeLinked: false,
136 NSPrivacyCollectedDataTypeTracking: false,
137 NSPrivacyCollectedDataTypePurposes: [
138 'NSPrivacyCollectedDataTypePurposeAppFunctionality',
139 ],
140 },
141 {
142 NSPrivacyCollectedDataType:
143 'NSPrivacyCollectedDataTypeOtherDiagnosticData',
144 NSPrivacyCollectedDataTypeLinked: false,
145 NSPrivacyCollectedDataTypeTracking: false,
146 NSPrivacyCollectedDataTypePurposes: [
147 'NSPrivacyCollectedDataTypePurposeAppFunctionality',
148 ],
149 },
150 ],
151 NSPrivacyAccessedAPITypes: [
152 {
153 NSPrivacyAccessedAPIType:
154 'NSPrivacyAccessedAPICategoryFileTimestamp',
155 NSPrivacyAccessedAPITypeReasons: ['C617.1', '3B52.1', '0A2A.1'],
156 },
157 {
158 NSPrivacyAccessedAPIType: 'NSPrivacyAccessedAPICategoryDiskSpace',
159 NSPrivacyAccessedAPITypeReasons: ['E174.1', '85F4.1'],
160 },
161 {
162 NSPrivacyAccessedAPIType:
163 'NSPrivacyAccessedAPICategorySystemBootTime',
164 NSPrivacyAccessedAPITypeReasons: ['35F9.1'],
165 },
166 {
167 NSPrivacyAccessedAPIType:
168 'NSPrivacyAccessedAPICategoryUserDefaults',
169 NSPrivacyAccessedAPITypeReasons: ['CA92.1', '1C8F.1'],
170 },
171 ],
172 },
173 },
174 androidStatusBar: {
175 barStyle: 'light-content',
176 },
177 // Dark nav bar in light mode is better than light nav bar in dark mode
178 androidNavigationBar: {
179 barStyle: 'light-content',
180 },
181 android: {
182 icon: './assets/app-icons/android_icon_default_next.png',
183 adaptiveIcon: {
184 foregroundImage: './assets/icon-android-foreground.png',
185 monochromeImage: './assets/icon-android-monochrome.png',
186 backgroundColor: '#ED5345',
187 },
188 googleServicesFile: './google-services.json',
189 package: 'app.witchsky',
190 intentFilters: [
191 {
192 action: 'VIEW',
193 autoVerify: true,
194 data: [
195 {
196 scheme: 'https',
197 host: 'witchsky.app',
198 },
199 {
200 scheme: 'https',
201 host: 'deer.social',
202 },
203 {
204 scheme: 'https',
205 host: 'bsky.app',
206 },
207 IS_DEV && {
208 scheme: 'http',
209 host: 'localhost:19006',
210 },
211 ],
212 category: ['BROWSABLE', 'DEFAULT'],
213 },
214 ],
215 },
216 web: {
217 favicon: './assets/favicon.png',
218 },
219 // updates: {
220 // url: 'https://updates.bsky.app/manifest',
221 // enabled: UPDATES_ENABLED,
222 // fallbackToCacheTimeout: 30000,
223 // codeSigningCertificate: UPDATES_ENABLED
224 // ? './code-signing/certificate.pem'
225 // : undefined,
226 // codeSigningMetadata: UPDATES_ENABLED
227 // ? {
228 // keyid: 'main',
229 // alg: 'rsa-v1_5-sha256',
230 // }
231 // : undefined,
232 // checkAutomatically: 'NEVER',
233 // channel: UPDATES_CHANNEL,
234 // },
235 updates: {
236 url: 'https://updates.bsky.app/manifest',
237 enabled: UPDATES_ENABLED,
238 fallbackToCacheTimeout: 30000,
239 codeSigningCertificate: UPDATES_ENABLED
240 ? './code-signing/certificate.pem'
241 : undefined,
242 codeSigningMetadata: UPDATES_ENABLED
243 ? {
244 keyid: 'main',
245 alg: 'rsa-v1_5-sha256',
246 }
247 : undefined,
248 checkAutomatically: 'NEVER',
249 },
250 plugins: [
251 'expo-video',
252 'expo-localization',
253 'expo-web-browser',
254 [
255 'react-native-edge-to-edge',
256 {android: {enforceNavigationBarContrast: false}},
257 ],
258 USE_SENTRY && [
259 '@sentry/react-native/expo',
260 {
261 organization: 'blueskyweb',
262 project: 'app',
263 url: 'https://sentry.io',
264 },
265 ],
266 [
267 'expo-build-properties',
268 {
269 ios: {
270 deploymentTarget: '15.1',
271 buildReactNativeFromSource: true,
272 },
273 android: {
274 compileSdkVersion: 35,
275 targetSdkVersion: 35,
276 buildToolsVersion: '35.0.0',
277 },
278 },
279 ],
280 [
281 'expo-notifications',
282 {
283 icon: './assets/icon-android-notification.png',
284 color: '#ED5345',
285 sounds: PLATFORM === 'ios' ? ['assets/dm.aiff'] : ['assets/dm.mp3'],
286 },
287 ],
288 'react-native-compressor',
289 [
290 '@bitdrift/react-native',
291 {
292 networkInstrumentation: true,
293 },
294 ],
295 './plugins/starterPackAppClipExtension/withStarterPackAppClip.js',
296 './plugins/withGradleJVMHeapSizeIncrease.js',
297 './plugins/withAndroidManifestLargeHeapPlugin.js',
298 './plugins/withAndroidManifestFCMIconPlugin.js',
299 './plugins/withAndroidManifestIntentQueriesPlugin.js',
300 './plugins/withAndroidStylesAccentColorPlugin.js',
301 './plugins/withAndroidDayNightThemePlugin.js',
302 './plugins/withAndroidNoJitpackPlugin.js',
303 './plugins/shareExtension/withShareExtensions.js',
304 './plugins/notificationsExtension/withNotificationsExtension.js',
305 [
306 'expo-font',
307 {
308 fonts: [
309 './assets/fonts/inter/InterVariable.woff2',
310 './assets/fonts/inter/InterVariable-Italic.woff2',
311 // Android only
312 './assets/fonts/inter/Inter-Regular.otf',
313 './assets/fonts/inter/Inter-Italic.otf',
314 './assets/fonts/inter/Inter-Medium.otf',
315 './assets/fonts/inter/Inter-MediumItalic.otf',
316 './assets/fonts/inter/Inter-SemiBold.otf',
317 './assets/fonts/inter/Inter-SemiBoldItalic.otf',
318 './assets/fonts/inter/Inter-Bold.otf',
319 './assets/fonts/inter/Inter-BoldItalic.otf',
320 ],
321 },
322 ],
323 [
324 'expo-splash-screen',
325 {
326 ios: {
327 enableFullScreenImage_legacy: true,
328 backgroundColor: '#ffffff',
329 image: './assets/splash.png',
330 resizeMode: 'cover',
331 dark: {
332 enableFullScreenImage_legacy: true,
333 backgroundColor: '#262220',
334 image: './assets/splash-dark.png',
335 resizeMode: 'cover',
336 },
337 },
338 android: {
339 backgroundColor: '#E25C50',
340 image: './assets/splash-android-icon.png',
341 imageWidth: 150,
342 dark: {
343 backgroundColor: '#ED5345',
344 image: './assets/splash-android-icon-dark.png',
345 imageWidth: 150,
346 },
347 },
348 },
349 ],
350 [
351 '@mozzius/expo-dynamic-app-icon',
352 {
353 /**
354 * Default set
355 */
356 default_light: {
357 ios: './assets/app-icons/ios_icon_legacy_light.png',
358 android: './assets/app-icons/android_icon_legacy_light.png',
359 prerendered: true,
360 },
361 default_dark: {
362 ios: './assets/app-icons/ios_icon_legacy_dark.png',
363 android: './assets/app-icons/android_icon_legacy_dark.png',
364 prerendered: true,
365 },
366
367 /**
368 * Bluesky+ core set
369 */
370 // core_aurora: {
371 // ios: './assets/app-icons/ios_icon_core_aurora.png',
372 // android: './assets/app-icons/android_icon_core_aurora.png',
373 // prerendered: true,
374 // },
375 // core_bonfire: {
376 // ios: './assets/app-icons/ios_icon_core_bonfire.png',
377 // android: './assets/app-icons/android_icon_core_bonfire.png',
378 // prerendered: true,
379 // },
380 // core_sunrise: {
381 // ios: './assets/app-icons/ios_icon_core_sunrise.png',
382 // android: './assets/app-icons/android_icon_core_sunrise.png',
383 // prerendered: true,
384 // },
385 // core_sunset: {
386 // ios: './assets/app-icons/ios_icon_core_sunset.png',
387 // android: './assets/app-icons/android_icon_core_sunset.png',
388 // prerendered: true,
389 // },
390 // core_midnight: {
391 // ios: './assets/app-icons/ios_icon_core_midnight.png',
392 // android: './assets/app-icons/android_icon_core_midnight.png',
393 // prerendered: true,
394 // },
395 // core_flat_blue: {
396 // ios: './assets/app-icons/ios_icon_core_flat_blue.png',
397 // android: './assets/app-icons/android_icon_core_flat_blue.png',
398 // prerendered: true,
399 // },
400 // core_flat_white: {
401 // ios: './assets/app-icons/ios_icon_core_flat_white.png',
402 // android: './assets/app-icons/android_icon_core_flat_white.png',
403 // prerendered: true,
404 // },
405 // core_flat_black: {
406 // ios: './assets/app-icons/ios_icon_core_flat_black.png',
407 // android: './assets/app-icons/android_icon_core_flat_black.png',
408 // prerendered: true,
409 // },
410 // core_classic: {
411 // ios: './assets/app-icons/ios_icon_core_classic.png',
412 // android: './assets/app-icons/android_icon_core_classic.png',
413 // prerendered: true,
414 // },
415 },
416 ],
417 ['expo-screen-orientation', {initialOrientation: 'PORTRAIT_UP'}],
418 ['expo-location'],
419 ].filter(Boolean),
420 extra: {
421 eas: {
422 build: {
423 experimental: {
424 ios: {
425 // appExtensions: [
426 // {
427 // targetName: 'Share-with-Bluesky',
428 // bundleIdentifier: 'app.witchsky.Share-with-Bluesky',
429 // entitlements: {
430 // 'com.apple.security.application-groups': [
431 // 'group.app.witchsky',
432 // ],
433 // },
434 // },
435 // {
436 // targetName: 'BlueskyNSE',
437 // bundleIdentifier: 'app.witchsky.BlueskyNSE',
438 // entitlements: {
439 // 'com.apple.security.application-groups': [
440 // 'group.app.witchsky',
441 // ],
442 // },
443 // },
444 // {
445 // targetName: 'BlueskyClip',
446 // bundleIdentifier: 'app.witchsky.AppClip',
447 // },
448 // ],
449 },
450 },
451 },
452 projectId: 'da056e41-38f9-4fee-a534-b9c5891f9c8d',
453 },
454 },
455 },
456 }
457}