Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435// Single source of truth for "this feature only exists on some platforms", so// the UI, the stores and the native bridges all agree on what is reachable.import { Platform } from 'react-native';import Constants from 'expo-constants';
const comailBuild = Constants.expoConfig?.extra?.comailServices === true;
/** * In-app sideload updates: download the release APK from GitHub and hand it to * the system package installer (see `lib/install-update`). * * Android only. App Store Review guideline 2.5.2 forbids an iOS app from * downloading and installing executable code, and there is no iOS equivalent of * the installer intent anyway - iOS builds are updated through TestFlight or * the App Store. The whole updater surface (banner, settings pane, launch-time * check) is hidden when this is false. * Comail's private development repository has no public signed distribution * channel yet, so Comail builds keep this disabled. */export const supportsSideloadUpdates = Platform.OS === 'android' && !comailBuild;
/** * Device sync: address books and calendars in Android's Contacts and Calendar * providers, under an account of the app's own type (#34, * docs/device-sync.md). * * Android only: iOS has no third-party sync-provider API for either. The UI * also needs the native module (`isDeviceSyncAvailable()` in * `device-sync/native`), so a build without it hides the feature instead of * failing. * The inherited background engine talks directly to Stalwart. Comail keeps it * disabled until it uses the PDS adapters used by the foreground screens. */export const supportsDeviceSync = Platform.OS === 'android' && !comailBuild;