Bluesky app fork with some witchin' additions 馃挮
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 0ac5b07bfd31a6b39706ca9b6a42d2db09501e52 449 lines 15 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:bsky.app', 27 'applinks:staging.bsky.app', 28 'appclips:bsky.app', 29 'appclips:go.bsky.app', // Allows App Clip to work when scanning QR codes 30 // When testing local services, enter an ngrok (et al) domain here. It must use a standard HTTP/HTTPS port. 31 ...(IS_DEV || IS_TESTFLIGHT ? [] : []), 32 ] 33 34 const UPDATES_ENABLED = IS_TESTFLIGHT || IS_PRODUCTION 35 36 const USE_SENTRY = Boolean(process.env.SENTRY_AUTH_TOKEN) 37 38 return { 39 expo: { 40 version: VERSION, 41 name: 'Bluesky', 42 slug: 'bluesky', 43 scheme: 'bluesky', 44 owner: 'blueskysocial', 45 runtimeVersion: { 46 policy: 'appVersion', 47 }, 48 icon: './assets/app-icons/ios_icon_default_next.png', 49 userInterfaceStyle: 'automatic', 50 primaryColor: '#1083fe', 51 newArchEnabled: false, 52 ios: { 53 supportsTablet: false, 54 bundleIdentifier: 'xyz.blueskyweb.app', 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, posts, and other kinds of content.', 66 NSMicrophoneUsageDescription: 67 'Used for posts and other kinds of content.', 68 NSPhotoLibraryAddUsageDescription: 69 'Used to save images to your library.', 70 NSPhotoLibraryUsageDescription: 71 'Used for profile pictures, posts, and other kinds of content', 72 CFBundleSpokenName: 'Blue Sky', 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.bsky', 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: '#006AFF', 188 }, 189 googleServicesFile: './google-services.json', 190 package: 'xyz.blueskyweb.app', 191 intentFilters: [ 192 { 193 action: 'VIEW', 194 autoVerify: true, 195 data: [ 196 { 197 scheme: 'https', 198 host: 'bsky.app', 199 }, 200 ...(IS_DEV 201 ? [ 202 { 203 scheme: 'http', 204 host: 'localhost:19006', 205 }, 206 ] 207 : []), 208 ], 209 category: ['BROWSABLE', 'DEFAULT'], 210 }, 211 ], 212 }, 213 web: { 214 favicon: './assets/favicon.png', 215 }, 216 updates: { 217 url: 'https://updates.bsky.app/manifest', 218 enabled: UPDATES_ENABLED, 219 fallbackToCacheTimeout: 30000, 220 codeSigningCertificate: UPDATES_ENABLED 221 ? './code-signing/certificate.pem' 222 : undefined, 223 codeSigningMetadata: UPDATES_ENABLED 224 ? { 225 keyid: 'main', 226 alg: 'rsa-v1_5-sha256', 227 } 228 : undefined, 229 checkAutomatically: 'NEVER', 230 }, 231 plugins: [ 232 'expo-video', 233 'expo-localization', 234 'expo-web-browser', 235 [ 236 'react-native-edge-to-edge', 237 {android: {enforceNavigationBarContrast: false}}, 238 ], 239 ...(USE_SENTRY 240 ? [ 241 /** @type {[string, any]} */ ([ 242 '@sentry/react-native/expo', 243 { 244 organization: 'blueskyweb', 245 project: 'app', 246 url: 'https://sentry.io', 247 }, 248 ]), 249 ] 250 : []), 251 [ 252 'expo-build-properties', 253 { 254 ios: { 255 deploymentTarget: '15.1', 256 buildReactNativeFromSource: true, 257 ccacheEnabled: IS_DEV, 258 }, 259 android: { 260 compileSdkVersion: 35, 261 targetSdkVersion: 35, 262 buildToolsVersion: '35.0.0', 263 buildReactNativeFromSource: IS_PRODUCTION, 264 }, 265 }, 266 ], 267 [ 268 'expo-notifications', 269 { 270 icon: './assets/icon-android-notification.png', 271 color: '#1185fe', 272 sounds: PLATFORM === 'ios' ? ['assets/dm.aiff'] : ['assets/dm.mp3'], 273 }, 274 ], 275 'react-native-compressor', 276 [ 277 '@bitdrift/react-native', 278 { 279 networkInstrumentation: true, 280 }, 281 ], 282 './plugins/starterPackAppClipExtension/withStarterPackAppClip.js', 283 './plugins/withGradleJVMHeapSizeIncrease.js', 284 './plugins/withAndroidManifestLargeHeapPlugin.js', 285 './plugins/withAndroidManifestFCMIconPlugin.js', 286 './plugins/withAndroidManifestIntentQueriesPlugin.js', 287 './plugins/withAndroidStylesAccentColorPlugin.js', 288 './plugins/withAndroidDayNightThemePlugin.js', 289 './plugins/withAndroidNoJitpackPlugin.js', 290 './plugins/shareExtension/withShareExtensions.js', 291 './plugins/notificationsExtension/withNotificationsExtension.js', 292 [ 293 'expo-font', 294 { 295 fonts: [ 296 './assets/fonts/inter/InterVariable.woff2', 297 './assets/fonts/inter/InterVariable-Italic.woff2', 298 // Android only 299 './assets/fonts/inter/Inter-Regular.otf', 300 './assets/fonts/inter/Inter-Italic.otf', 301 './assets/fonts/inter/Inter-Medium.otf', 302 './assets/fonts/inter/Inter-MediumItalic.otf', 303 './assets/fonts/inter/Inter-SemiBold.otf', 304 './assets/fonts/inter/Inter-SemiBoldItalic.otf', 305 './assets/fonts/inter/Inter-Bold.otf', 306 './assets/fonts/inter/Inter-BoldItalic.otf', 307 ], 308 }, 309 ], 310 [ 311 'expo-splash-screen', 312 { 313 enableFullScreenImage_legacy: true, // iOS only 314 backgroundColor: '#EEF5FF', // based on illustration 315 image: './assets/splash/splash-mobile.png', 316 resizeMode: 'cover', 317 dark: { 318 enableFullScreenImage_legacy: true, // iOS only 319 backgroundColor: '#446DA9', // based on illustration 320 image: './assets/splash/splash-mobile-dark.png', 321 resizeMode: 'cover', 322 }, 323 android: { 324 backgroundColor: '#A8CCFF', // primary_200 325 image: './assets/splash/android-splash-logo-white.png', 326 imageWidth: 105, 327 dark: { 328 backgroundColor: '#00398A', // primary_800 329 image: './assets/splash/android-splash-logo-white.png', 330 imageWidth: 105, 331 }, 332 }, 333 }, 334 ], 335 [ 336 '@mozzius/expo-dynamic-app-icon', 337 { 338 /** 339 * Default set 340 */ 341 default_light: { 342 ios: './assets/app-icons/ios_icon_legacy_light.png', 343 android: './assets/app-icons/android_icon_legacy_light.png', 344 prerendered: true, 345 }, 346 default_dark: { 347 ios: './assets/app-icons/ios_icon_legacy_dark.png', 348 android: './assets/app-icons/android_icon_legacy_dark.png', 349 prerendered: true, 350 }, 351 352 /** 353 * Bluesky+ core set 354 */ 355 core_aurora: { 356 ios: './assets/app-icons/ios_icon_core_aurora.png', 357 android: './assets/app-icons/android_icon_core_aurora.png', 358 prerendered: true, 359 }, 360 core_bonfire: { 361 ios: './assets/app-icons/ios_icon_core_bonfire.png', 362 android: './assets/app-icons/android_icon_core_bonfire.png', 363 prerendered: true, 364 }, 365 core_sunrise: { 366 ios: './assets/app-icons/ios_icon_core_sunrise.png', 367 android: './assets/app-icons/android_icon_core_sunrise.png', 368 prerendered: true, 369 }, 370 core_sunset: { 371 ios: './assets/app-icons/ios_icon_core_sunset.png', 372 android: './assets/app-icons/android_icon_core_sunset.png', 373 prerendered: true, 374 }, 375 core_midnight: { 376 ios: './assets/app-icons/ios_icon_core_midnight.png', 377 android: './assets/app-icons/android_icon_core_midnight.png', 378 prerendered: true, 379 }, 380 core_flat_blue: { 381 ios: './assets/app-icons/ios_icon_core_flat_blue.png', 382 android: './assets/app-icons/android_icon_core_flat_blue.png', 383 prerendered: true, 384 }, 385 core_flat_white: { 386 ios: './assets/app-icons/ios_icon_core_flat_white.png', 387 android: './assets/app-icons/android_icon_core_flat_white.png', 388 prerendered: true, 389 }, 390 core_flat_black: { 391 ios: './assets/app-icons/ios_icon_core_flat_black.png', 392 android: './assets/app-icons/android_icon_core_flat_black.png', 393 prerendered: true, 394 }, 395 core_classic: { 396 ios: './assets/app-icons/ios_icon_core_classic.png', 397 android: './assets/app-icons/android_icon_core_classic.png', 398 prerendered: true, 399 }, 400 }, 401 ], 402 ['expo-screen-orientation', {initialOrientation: 'PORTRAIT_UP'}], 403 ['expo-location'], 404 [ 405 'expo-contacts', 406 { 407 contactsPermission: 408 'I agree to allow Bluesky to use my contacts for friend discovery until I opt out.', 409 }, 410 ], 411 ], 412 extra: { 413 eas: { 414 build: { 415 experimental: { 416 ios: { 417 appExtensions: [ 418 { 419 targetName: 'Share-with-Bluesky', 420 bundleIdentifier: 'xyz.blueskyweb.app.Share-with-Bluesky', 421 entitlements: { 422 'com.apple.security.application-groups': [ 423 'group.app.bsky', 424 ], 425 }, 426 }, 427 { 428 targetName: 'BlueskyNSE', 429 bundleIdentifier: 'xyz.blueskyweb.app.BlueskyNSE', 430 entitlements: { 431 'com.apple.security.application-groups': [ 432 'group.app.bsky', 433 ], 434 }, 435 }, 436 { 437 targetName: 'BlueskyClip', 438 bundleIdentifier: 'xyz.blueskyweb.app.AppClip', 439 }, 440 ], 441 }, 442 }, 443 }, 444 projectId: '55bd077a-d905-4184-9c7f-94789ba0f302', 445 }, 446 }, 447 }, 448 } 449}