147 lines
5.4 KiB
JavaScript
147 lines
5.4 KiB
JavaScript
// Single source of truth for the Predikt web domain used across native config
|
|
// (deep links + associated domains). Keep this in sync with DOMAIN in
|
|
// lib/config.ts, which the WebView shell (App.tsx) reads at runtime.
|
|
//
|
|
// TODO(SHIP): replace REPLACE_WITH_DOMAIN with the real Predikt web domain.
|
|
const DOMAIN = process.env.EXPO_PUBLIC_WEB_DOMAIN || 'REPLACE_WITH_DOMAIN'
|
|
|
|
// EAS project id — generated by `eas init` and required for push tokens
|
|
// (getExpoPushTokenAsync reads it via Constants.expoConfig.extra.eas.projectId)
|
|
// and for OTA updates. It is NOT a secret, but it is environment-specific, so it
|
|
// is read from EAS_PROJECT_ID with a placeholder fallback rather than committed.
|
|
// TODO(SHIP): run `eas init`, then set EAS_PROJECT_ID (e.g. in eas.json env or
|
|
// the EAS dashboard) to the generated UUID.
|
|
const EAS_PROJECT_ID =
|
|
process.env.EAS_PROJECT_ID || 'REPLACE_WITH_EAS_PROJECT_ID'
|
|
|
|
export default ({ config }) => {
|
|
const otaUpdateVersion = '1.0.0'
|
|
|
|
return {
|
|
expo: {
|
|
name: 'Predikt',
|
|
slug: 'predikt',
|
|
// TODO(SHIP): set to the Predikt EAS account/org that owns this project.
|
|
// Read from EAS_OWNER so no foreign account is committed; the placeholder
|
|
// must be replaced before `eas build`/`eas update` will resolve.
|
|
owner: process.env.EAS_OWNER || 'REPLACE_WITH_EAS_OWNER',
|
|
scheme: 'predikt',
|
|
newArchEnabled: true,
|
|
jsEngine: 'hermes',
|
|
version: '2.0.71',
|
|
orientation: 'portrait',
|
|
icon: './assets/logo.png',
|
|
userInterfaceStyle: 'light',
|
|
plugins: [
|
|
'./plugins/withAndroidVerifiedLinksWorkaround',
|
|
'expo-font',
|
|
[
|
|
'expo-notifications',
|
|
{
|
|
icon: './assets/notification-icon.png',
|
|
color: '#4337C9',
|
|
defaultChannel: 'default',
|
|
},
|
|
],
|
|
[
|
|
'@sentry/react-native/expo',
|
|
{
|
|
// TODO(SHIP): set to the real Predikt Sentry org, or remove this
|
|
// plugin entry (and sentry.properties + Sentry.init in App.tsx) if
|
|
// error reporting is not wired up yet.
|
|
organization: 'REPLACE_WITH_SENTRY_ORG',
|
|
project: 'react-native',
|
|
url: 'https://sentry.io/',
|
|
},
|
|
],
|
|
['expo-web-browser'],
|
|
['expo-apple-authentication'],
|
|
],
|
|
splash: {
|
|
image: './assets/splash.png',
|
|
resizeMode: 'cover',
|
|
backgroundColor: '#4337C9',
|
|
},
|
|
web: {
|
|
favicon: './assets/favicon.png',
|
|
},
|
|
platforms: ['ios', 'android'],
|
|
updates: {
|
|
fallbackToCacheTimeout: 0,
|
|
url: `https://u.expo.dev/${EAS_PROJECT_ID}`,
|
|
},
|
|
android: {
|
|
intentFilters: [
|
|
{
|
|
action: 'VIEW',
|
|
autoVerify: true,
|
|
data: [
|
|
{
|
|
scheme: 'https',
|
|
host: DOMAIN,
|
|
},
|
|
],
|
|
category: ['BROWSABLE', 'DEFAULT'],
|
|
},
|
|
],
|
|
edgeToEdgeEnabled: true,
|
|
googleServicesFile: './google-services.json',
|
|
adaptiveIcon: {
|
|
foregroundImage: './assets/adaptive-icon.png',
|
|
backgroundColor: '#4337C9',
|
|
},
|
|
package: 'com.predikt.app',
|
|
versionCode: 71,
|
|
runtimeVersion: otaUpdateVersion,
|
|
},
|
|
ios: {
|
|
infoPlist: {
|
|
NSCameraUsageDescription:
|
|
'Pictures can be attached to the content you create.',
|
|
ITSAppUsesNonExemptEncryption: false,
|
|
},
|
|
supportsTablet: true,
|
|
usesAppleSignIn: true,
|
|
bundleIdentifier: 'com.predikt.app',
|
|
associatedDomains: [`applinks:${DOMAIN}`, `webcredentials:${DOMAIN}`],
|
|
buildNumber: '1.0.71',
|
|
runtimeVersion: otaUpdateVersion,
|
|
privacyManifests: {
|
|
NSPrivacyTracking: false,
|
|
NSPrivacyTrackingDomains: [],
|
|
NSPrivacyAccessedAPITypes: [
|
|
{ NSPrivacyAccessedAPIType: 'NSPrivacyAccessedAPICategoryUserDefaults', NSPrivacyAccessedAPITypeReasons: ['CA92.1'] },
|
|
{ NSPrivacyAccessedAPIType: 'NSPrivacyAccessedAPICategoryFileTimestamp', NSPrivacyAccessedAPITypeReasons: ['C617.1'] },
|
|
{ NSPrivacyAccessedAPIType: 'NSPrivacyAccessedAPICategorySystemBootTime', NSPrivacyAccessedAPITypeReasons: ['35F9.1'] },
|
|
{ NSPrivacyAccessedAPIType: 'NSPrivacyAccessedAPICategoryDiskSpace', NSPrivacyAccessedAPITypeReasons: ['E174.1'] },
|
|
],
|
|
NSPrivacyCollectedDataTypes: [
|
|
{
|
|
NSPrivacyCollectedDataType: 'NSPrivacyCollectedDataTypeCrashData',
|
|
NSPrivacyCollectedDataTypeLinked: false,
|
|
NSPrivacyCollectedDataTypeTracking: false,
|
|
NSPrivacyCollectedDataTypePurposes: ['NSPrivacyCollectedDataTypePurposeAppFunctionality'],
|
|
},
|
|
{
|
|
NSPrivacyCollectedDataType: 'NSPrivacyCollectedDataTypePerformanceData',
|
|
NSPrivacyCollectedDataTypeLinked: false,
|
|
NSPrivacyCollectedDataTypeTracking: false,
|
|
NSPrivacyCollectedDataTypePurposes: ['NSPrivacyCollectedDataTypePurposeAppFunctionality'],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
runtimeVersion: otaUpdateVersion,
|
|
extra: {
|
|
...config?.extra,
|
|
eas: {
|
|
...config?.extra?.eas,
|
|
projectId: EAS_PROJECT_ID,
|
|
NATIVE_BUILD_TYPE: process.env.NATIVE_BUILD_TYPE,
|
|
NEXT_PUBLIC_FIREBASE_ENV: process.env.NEXT_PUBLIC_FIREBASE_ENV,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|