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