2023-11-29 04:49:37 +01:00
|
|
|
const pkg = require('./package.json')
|
|
|
|
|
2024-01-08 23:55:47 +01:00
|
|
|
const SPLASH_CONFIG = {
|
|
|
|
backgroundColor: '#ffffff',
|
|
|
|
image: './assets/splash.png',
|
|
|
|
resizeMode: 'cover',
|
|
|
|
}
|
|
|
|
const DARK_SPLASH_CONFIG = {
|
|
|
|
backgroundColor: '#001429',
|
|
|
|
image: './assets/splash-dark.png',
|
|
|
|
resizeMode: 'cover',
|
|
|
|
}
|
|
|
|
|
2024-03-06 06:28:27 +01:00
|
|
|
const SPLASH_CONFIG_ANDROID = {
|
|
|
|
backgroundColor: '#0c7cff',
|
|
|
|
image: './assets/splash.png',
|
|
|
|
resizeMode: 'cover',
|
|
|
|
}
|
|
|
|
const DARK_SPLASH_CONFIG_ANDROID = {
|
|
|
|
backgroundColor: '#0f141b',
|
|
|
|
image: './assets/splash-dark.png',
|
|
|
|
resizeMode: 'cover',
|
|
|
|
}
|
|
|
|
|
2024-02-21 22:54:31 +01:00
|
|
|
module.exports = function (config) {
|
2023-11-29 04:49:37 +01:00
|
|
|
/**
|
|
|
|
* App version number. Should be incremented as part of a release cycle.
|
|
|
|
*/
|
|
|
|
const VERSION = pkg.version
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Uses built-in Expo env vars
|
|
|
|
*
|
|
|
|
* @see https://docs.expo.dev/build-reference/variables/#built-in-environment-variables
|
|
|
|
*/
|
|
|
|
const PLATFORM = process.env.EAS_BUILD_PLATFORM
|
|
|
|
|
2024-03-11 19:57:23 +01:00
|
|
|
const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development'
|
2024-04-04 00:14:44 +02:00
|
|
|
const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
|
2024-04-12 23:51:53 +02:00
|
|
|
const IS_PRODUCTION = process.env.EXPO_PUBLIC_ENV === 'production'
|
2024-04-04 00:14:44 +02:00
|
|
|
|
2024-04-12 23:51:53 +02:00
|
|
|
const UPDATES_CHANNEL = IS_TESTFLIGHT
|
|
|
|
? 'testflight'
|
|
|
|
: IS_PRODUCTION
|
|
|
|
? 'production'
|
|
|
|
: undefined
|
|
|
|
const UPDATES_ENABLED = !!UPDATES_CHANNEL
|
2024-03-11 19:57:23 +01:00
|
|
|
|
2024-04-16 23:38:25 +02:00
|
|
|
const SENTRY_DIST = `${PLATFORM}.${VERSION}.${IS_TESTFLIGHT ? 'tf' : ''}${
|
|
|
|
IS_DEV ? 'dev' : ''
|
|
|
|
}`
|
|
|
|
|
2023-09-08 17:47:01 +02:00
|
|
|
return {
|
|
|
|
expo: {
|
2023-11-29 04:49:37 +01:00
|
|
|
version: VERSION,
|
2023-09-08 17:47:01 +02:00
|
|
|
name: 'Bluesky',
|
|
|
|
slug: 'bluesky',
|
|
|
|
scheme: 'bluesky',
|
|
|
|
owner: 'blueskysocial',
|
|
|
|
runtimeVersion: {
|
|
|
|
policy: 'appVersion',
|
|
|
|
},
|
|
|
|
orientation: 'portrait',
|
|
|
|
icon: './assets/icon.png',
|
|
|
|
userInterfaceStyle: 'automatic',
|
2024-01-08 23:55:47 +01:00
|
|
|
splash: SPLASH_CONFIG,
|
2024-04-29 20:36:05 +02:00
|
|
|
// hsl(211, 99%, 53%), same as palette.default.brandText
|
|
|
|
primaryColor: '#1083fe',
|
2023-09-08 17:47:01 +02:00
|
|
|
ios: {
|
|
|
|
supportsTablet: false,
|
|
|
|
bundleIdentifier: 'xyz.blueskyweb.app',
|
|
|
|
config: {
|
|
|
|
usesNonExemptEncryption: false,
|
|
|
|
},
|
|
|
|
infoPlist: {
|
|
|
|
UIBackgroundModes: ['remote-notification'],
|
|
|
|
NSCameraUsageDescription:
|
|
|
|
'Used for profile pictures, posts, and other kinds of content.',
|
|
|
|
NSMicrophoneUsageDescription:
|
|
|
|
'Used for posts and other kinds of content.',
|
|
|
|
NSPhotoLibraryAddUsageDescription:
|
|
|
|
'Used to save images to your library.',
|
|
|
|
NSPhotoLibraryUsageDescription:
|
|
|
|
'Used for profile pictures, posts, and other kinds of content',
|
|
|
|
},
|
|
|
|
associatedDomains: ['applinks:bsky.app', 'applinks:staging.bsky.app'],
|
2024-01-08 22:47:25 +01:00
|
|
|
splash: {
|
2024-01-08 23:55:47 +01:00
|
|
|
...SPLASH_CONFIG,
|
|
|
|
dark: DARK_SPLASH_CONFIG,
|
2024-01-08 22:47:25 +01:00
|
|
|
},
|
2024-02-28 06:09:59 +01:00
|
|
|
entitlements: {
|
|
|
|
'com.apple.security.application-groups': 'group.app.bsky',
|
|
|
|
},
|
2024-05-06 22:47:55 +02:00
|
|
|
privacyManifests: {
|
|
|
|
NSPrivacyAccessedAPITypes: [
|
|
|
|
{
|
|
|
|
NSPrivacyAccessedAPIType:
|
|
|
|
'NSPrivacyAccessedAPICategoryFileTimestamp',
|
|
|
|
NSPrivacyAccessedAPITypeReasons: ['C617.1', '3B52.1', '0A2A.1'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
NSPrivacyAccessedAPIType: 'NSPrivacyAccessedAPICategoryDiskSpace',
|
|
|
|
NSPrivacyAccessedAPITypeReasons: ['E174.1', '85F4.1'],
|
|
|
|
},
|
|
|
|
{
|
2024-05-08 01:35:04 +02:00
|
|
|
NSPrivacyAccessedAPIType:
|
|
|
|
'NSPrivacyAccessedAPICategorySystemBootTime',
|
2024-05-06 22:47:55 +02:00
|
|
|
NSPrivacyAccessedAPITypeReasons: ['35F9.1'],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
NSPrivacyAccessedAPIType:
|
|
|
|
'NSPrivacyAccessedAPICategoryUserDefaults',
|
|
|
|
NSPrivacyAccessedAPITypeReasons: ['CA92.1'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2023-09-08 17:47:01 +02:00
|
|
|
},
|
|
|
|
androidStatusBar: {
|
2024-03-06 06:28:27 +01:00
|
|
|
barStyle: 'light-content',
|
|
|
|
backgroundColor: '#00000000',
|
2023-09-08 17:47:01 +02:00
|
|
|
},
|
2024-04-13 00:40:22 +02:00
|
|
|
// Dark nav bar in light mode is better than light nav bar in dark mode
|
|
|
|
androidNavigationBar: {
|
|
|
|
barStyle: 'light-content',
|
|
|
|
backgroundColor: DARK_SPLASH_CONFIG_ANDROID.backgroundColor,
|
|
|
|
},
|
2023-09-08 17:47:01 +02:00
|
|
|
android: {
|
2023-12-14 21:48:40 +01:00
|
|
|
icon: './assets/icon.png',
|
2023-09-08 17:47:01 +02:00
|
|
|
adaptiveIcon: {
|
2023-12-14 21:48:40 +01:00
|
|
|
foregroundImage: './assets/icon-android-foreground.png',
|
|
|
|
monochromeImage: './assets/icon-android-foreground.png',
|
|
|
|
backgroundImage: './assets/icon-android-background.png',
|
|
|
|
backgroundColor: '#1185FE',
|
2023-09-08 17:47:01 +02:00
|
|
|
},
|
|
|
|
googleServicesFile: './google-services.json',
|
|
|
|
package: 'xyz.blueskyweb.app',
|
|
|
|
intentFilters: [
|
|
|
|
{
|
|
|
|
action: 'VIEW',
|
|
|
|
autoVerify: true,
|
|
|
|
data: [
|
|
|
|
{
|
|
|
|
scheme: 'https',
|
|
|
|
host: 'bsky.app',
|
|
|
|
},
|
2024-03-11 19:57:23 +01:00
|
|
|
IS_DEV && {
|
2024-02-27 19:35:38 +01:00
|
|
|
scheme: 'http',
|
|
|
|
host: 'localhost:19006',
|
|
|
|
},
|
2023-09-08 17:47:01 +02:00
|
|
|
],
|
|
|
|
category: ['BROWSABLE', 'DEFAULT'],
|
|
|
|
},
|
|
|
|
],
|
2024-01-08 22:47:25 +01:00
|
|
|
splash: {
|
2024-03-06 06:28:27 +01:00
|
|
|
...SPLASH_CONFIG_ANDROID,
|
|
|
|
dark: DARK_SPLASH_CONFIG_ANDROID,
|
2024-01-08 22:47:25 +01:00
|
|
|
},
|
2023-09-08 17:47:01 +02:00
|
|
|
},
|
|
|
|
web: {
|
|
|
|
favicon: './assets/favicon.png',
|
|
|
|
},
|
|
|
|
updates: {
|
2024-04-04 00:14:44 +02:00
|
|
|
url: 'https://updates.bsky.app/manifest',
|
2024-04-12 23:51:53 +02:00
|
|
|
enabled: UPDATES_ENABLED,
|
2024-04-04 00:14:44 +02:00
|
|
|
fallbackToCacheTimeout: 30000,
|
2024-04-12 23:51:53 +02:00
|
|
|
codeSigningCertificate: UPDATES_ENABLED
|
2024-04-05 22:29:54 +02:00
|
|
|
? './code-signing/certificate.pem'
|
|
|
|
: undefined,
|
2024-04-12 23:51:53 +02:00
|
|
|
codeSigningMetadata: UPDATES_ENABLED
|
2024-04-05 22:29:54 +02:00
|
|
|
? {
|
|
|
|
keyid: 'main',
|
|
|
|
alg: 'rsa-v1_5-sha256',
|
|
|
|
}
|
|
|
|
: undefined,
|
2024-04-04 00:14:44 +02:00
|
|
|
checkAutomatically: 'NEVER',
|
|
|
|
channel: UPDATES_CHANNEL,
|
2023-09-08 17:47:01 +02:00
|
|
|
},
|
2024-04-04 00:14:44 +02:00
|
|
|
assetBundlePatterns: ['**/*'],
|
2023-09-08 17:47:01 +02:00
|
|
|
plugins: [
|
|
|
|
'expo-localization',
|
2023-11-29 04:49:37 +01:00
|
|
|
Boolean(process.env.SENTRY_AUTH_TOKEN) && 'sentry-expo',
|
2023-09-08 17:47:01 +02:00
|
|
|
[
|
|
|
|
'expo-build-properties',
|
|
|
|
{
|
2023-12-24 00:44:38 +01:00
|
|
|
ios: {
|
|
|
|
deploymentTarget: '13.4',
|
2024-03-06 03:55:23 +01:00
|
|
|
newArchEnabled: false,
|
2023-12-24 00:44:38 +01:00
|
|
|
},
|
2023-09-08 17:47:01 +02:00
|
|
|
android: {
|
|
|
|
compileSdkVersion: 34,
|
|
|
|
targetSdkVersion: 34,
|
|
|
|
buildToolsVersion: '34.0.0',
|
|
|
|
kotlinVersion: '1.8.0',
|
2024-03-06 03:55:23 +01:00
|
|
|
newArchEnabled: false,
|
2023-09-08 17:47:01 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2024-02-06 00:22:17 +01:00
|
|
|
[
|
|
|
|
'expo-notifications',
|
|
|
|
{
|
|
|
|
icon: './assets/icon-android-notification.png',
|
2024-03-06 19:24:08 +01:00
|
|
|
color: '#1185fe',
|
2024-05-15 03:02:57 +02:00
|
|
|
sounds: ['assets/blueskydm.wav'],
|
2024-02-06 00:22:17 +01:00
|
|
|
},
|
|
|
|
],
|
2023-12-12 22:40:24 +01:00
|
|
|
'./plugins/withAndroidManifestPlugin.js',
|
2024-03-06 19:24:08 +01:00
|
|
|
'./plugins/withAndroidManifestFCMIconPlugin.js',
|
2024-03-06 06:28:27 +01:00
|
|
|
'./plugins/withAndroidStylesWindowBackgroundPlugin.js',
|
2024-04-29 20:36:05 +02:00
|
|
|
'./plugins/withAndroidStylesAccentColorPlugin.js',
|
2024-03-21 17:53:01 +01:00
|
|
|
'./plugins/withAndroidSplashScreenStatusBarTranslucentPlugin.js',
|
2024-02-28 00:22:03 +01:00
|
|
|
'./plugins/shareExtension/withShareExtensions.js',
|
2023-09-08 17:47:01 +02:00
|
|
|
].filter(Boolean),
|
|
|
|
extra: {
|
|
|
|
eas: {
|
2024-02-28 05:54:12 +01:00
|
|
|
build: {
|
|
|
|
experimental: {
|
|
|
|
ios: {
|
|
|
|
appExtensions: [
|
|
|
|
{
|
|
|
|
targetName: 'Share-with-Bluesky',
|
|
|
|
bundleIdentifier: 'xyz.blueskyweb.app.Share-with-Bluesky',
|
2024-02-28 06:09:59 +01:00
|
|
|
entitlements: {
|
2024-02-28 06:11:48 +01:00
|
|
|
'com.apple.security.application-groups': [
|
|
|
|
'group.app.bsky',
|
|
|
|
],
|
2024-02-28 06:09:59 +01:00
|
|
|
},
|
2024-02-28 05:54:12 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-09-08 17:47:01 +02:00
|
|
|
projectId: '55bd077a-d905-4184-9c7f-94789ba0f302',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
hooks: {
|
|
|
|
postPublish: [
|
2023-11-29 04:49:37 +01:00
|
|
|
/*
|
|
|
|
* @see https://docs.expo.dev/guides/using-sentry/#app-configuration
|
|
|
|
*/
|
2023-09-08 17:47:01 +02:00
|
|
|
{
|
|
|
|
file: 'sentry-expo/upload-sourcemaps',
|
|
|
|
config: {
|
|
|
|
organization: 'blueskyweb',
|
|
|
|
project: 'react-native',
|
2023-11-29 04:49:37 +01:00
|
|
|
release: VERSION,
|
2024-04-16 23:38:25 +02:00
|
|
|
dist: SENTRY_DIST,
|
2023-09-08 17:47:01 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|