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