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