Bluesky app fork with some witchin' additions 馃挮
at viewport 481 lines 16 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 }, 289 android: { 290 compileSdkVersion: 35, 291 targetSdkVersion: 35, 292 buildToolsVersion: '35.0.0', 293 buildReactNativeFromSource: IS_PRODUCTION, 294 }, 295 }, 296 ], 297 [ 298 'expo-notifications', 299 { 300 icon: './assets/icon-android-notification.png', 301 color: '#ED5345', 302 sounds: PLATFORM === 'ios' ? ['assets/dm.aiff'] : ['assets/dm.mp3'], 303 }, 304 ], 305 'react-native-compressor', 306 [ 307 '@bitdrift/react-native', 308 { 309 networkInstrumentation: true, 310 }, 311 ], 312 './plugins/starterPackAppClipExtension/withStarterPackAppClip.js', 313 './plugins/withGradleJVMHeapSizeIncrease.js', 314 './plugins/withAndroidManifestLargeHeapPlugin.js', 315 './plugins/withAndroidManifestFCMIconPlugin.js', 316 './plugins/withAndroidManifestIntentQueriesPlugin.js', 317 './plugins/withAndroidStylesAccentColorPlugin.js', 318 './plugins/withAndroidDayNightThemePlugin.js', 319 './plugins/withAndroidNoJitpackPlugin.js', 320 './plugins/shareExtension/withShareExtensions.js', 321 './plugins/notificationsExtension/withNotificationsExtension.js', 322 [ 323 'expo-font', 324 { 325 fonts: [ 326 './assets/fonts/inter/InterVariable.woff2', 327 './assets/fonts/inter/InterVariable-Italic.woff2', 328 // Android only 329 './assets/fonts/inter/Inter-Regular.otf', 330 './assets/fonts/inter/Inter-Italic.otf', 331 './assets/fonts/inter/Inter-Medium.otf', 332 './assets/fonts/inter/Inter-MediumItalic.otf', 333 './assets/fonts/inter/Inter-SemiBold.otf', 334 './assets/fonts/inter/Inter-SemiBoldItalic.otf', 335 './assets/fonts/inter/Inter-Bold.otf', 336 './assets/fonts/inter/Inter-BoldItalic.otf', 337 ], 338 }, 339 ], 340 [ 341 'expo-splash-screen', 342 { 343 ios: { 344 enableFullScreenImage_legacy: true, // iOS only 345 backgroundColor: '#006AFF', // primary_500 346 image: './assets/splash/splash.png', 347 resizeMode: 'cover', 348 dark: { 349 enableFullScreenImage_legacy: true, // iOS only 350 backgroundColor: '#262220', // primary_900 351 image: './assets/splash/splash-dark.png', 352 resizeMode: 'cover', 353 }, 354 }, 355 android: { 356 backgroundColor: '#E25C50', // primary_500 357 image: './assets/splash/android-splash-logo-white.png', 358 imageWidth: 102, // even division of 306px 359 dark: { 360 backgroundColor: '#ED5345', // primary_900 361 image: './assets/splash/android-splash-logo-white.png', 362 imageWidth: 102, 363 }, 364 }, 365 }, 366 ], 367 [ 368 '@mozzius/expo-dynamic-app-icon', 369 { 370 /** 371 * Default set 372 */ 373 default_light: { 374 ios: './assets/app-icons/ios_icon_legacy_light.png', 375 android: './assets/app-icons/android_icon_legacy_light.png', 376 prerendered: true, 377 }, 378 default_dark: { 379 ios: './assets/app-icons/ios_icon_legacy_dark.png', 380 android: './assets/app-icons/android_icon_legacy_dark.png', 381 prerendered: true, 382 }, 383 384 /** 385 * Bluesky+ core set 386 */ 387 // core_aurora: { 388 // ios: './assets/app-icons/ios_icon_core_aurora.png', 389 // android: './assets/app-icons/android_icon_core_aurora.png', 390 // prerendered: true, 391 // }, 392 // core_bonfire: { 393 // ios: './assets/app-icons/ios_icon_core_bonfire.png', 394 // android: './assets/app-icons/android_icon_core_bonfire.png', 395 // prerendered: true, 396 // }, 397 // core_sunrise: { 398 // ios: './assets/app-icons/ios_icon_core_sunrise.png', 399 // android: './assets/app-icons/android_icon_core_sunrise.png', 400 // prerendered: true, 401 // }, 402 // core_sunset: { 403 // ios: './assets/app-icons/ios_icon_core_sunset.png', 404 // android: './assets/app-icons/android_icon_core_sunset.png', 405 // prerendered: true, 406 // }, 407 // core_midnight: { 408 // ios: './assets/app-icons/ios_icon_core_midnight.png', 409 // android: './assets/app-icons/android_icon_core_midnight.png', 410 // prerendered: true, 411 // }, 412 // core_flat_blue: { 413 // ios: './assets/app-icons/ios_icon_core_flat_blue.png', 414 // android: './assets/app-icons/android_icon_core_flat_blue.png', 415 // prerendered: true, 416 // }, 417 // core_flat_white: { 418 // ios: './assets/app-icons/ios_icon_core_flat_white.png', 419 // android: './assets/app-icons/android_icon_core_flat_white.png', 420 // prerendered: true, 421 // }, 422 // core_flat_black: { 423 // ios: './assets/app-icons/ios_icon_core_flat_black.png', 424 // android: './assets/app-icons/android_icon_core_flat_black.png', 425 // prerendered: true, 426 // }, 427 // core_classic: { 428 // ios: './assets/app-icons/ios_icon_core_classic.png', 429 // android: './assets/app-icons/android_icon_core_classic.png', 430 // prerendered: true, 431 // }, 432 }, 433 ], 434 ['expo-screen-orientation', {initialOrientation: 'PORTRAIT_UP'}], 435 ['expo-location'], 436 [ 437 'expo-contacts', 438 { 439 contactsPermission: 440 'I agree to allow Bluesky to use my contacts for friend discovery until I opt out.', 441 }, 442 ], 443 ], 444 extra: { 445 eas: { 446 build: { 447 experimental: { 448 ios: { 449 // appExtensions: [ 450 // { 451 // targetName: 'Share-with-Bluesky', 452 // bundleIdentifier: 'app.witchsky.Share-with-Bluesky', 453 // entitlements: { 454 // 'com.apple.security.application-groups': [ 455 // 'group.app.witchsky', 456 // ], 457 // }, 458 // }, 459 // { 460 // targetName: 'BlueskyNSE', 461 // bundleIdentifier: 'app.witchsky.BlueskyNSE', 462 // entitlements: { 463 // 'com.apple.security.application-groups': [ 464 // 'group.app.witchsky', 465 // ], 466 // }, 467 // }, 468 // { 469 // targetName: 'BlueskyClip', 470 // bundleIdentifier: 'app.witchsky.AppClip', 471 // }, 472 // ], 473 }, 474 }, 475 }, 476 projectId: 'da056e41-38f9-4fee-a534-b9c5891f9c8d', 477 }, 478 }, 479 }, 480 } 481}