/** * Expo Config Plugin for `expo-persistent-background-location`. * * Writes the platform glue a background-location module needs but that cannot * live in the autolinked library manifest alone: * * - **iOS**: the `NSLocation*UsageDescription` strings (App Store rejects * builds without them) and the `location` `UIBackgroundMode` (required for * background updates). `fetch` / `processing` are opt-in via * `enableBackgroundFetch` and off by default. * - **Android**: ensures the location / foreground-service / boot permissions * are present in the app manifest, and lets a consumer *opt out* of the * background-location and activity-recognition asks (e.g. to ease Play Store * review) via `tools:node="remove"`. * * Usage in `app.json` / `app.config.ts`: * * ["expo-persistent-background-location", { * "locationAlwaysAndWhenInUsePermission": "Track your run even when the screen is off.", * "isAndroidBackgroundLocationEnabled": true, * "isAndroidForegroundServiceEnabled": true, * "isActivityRecognitionEnabled": true * }] */ import { ConfigPlugin } from "expo/config-plugins"; export interface PluginOptions { /** iOS `NSLocationWhenInUseUsageDescription`. */ locationWhenInUsePermission?: string; /** iOS `NSLocationAlwaysAndWhenInUseUsageDescription`. */ locationAlwaysAndWhenInUsePermission?: string; /** iOS `NSLocationAlwaysUsageDescription` (legacy, still read by older OSes). */ locationAlwaysPermission?: string; /** * iOS `NSMotionUsageDescription`. Set to `false` to omit it (only needed if * you enable `motion.enabled` at runtime). Defaults to a sensible string. */ motionPermission?: string | false; /** * Add the iOS `fetch` / `processing` background modes. Defaults to `false` — * the module drives sync from the location stream + significant-location-change * wake-ups, not BGTaskScheduler, so only the `location` mode is required. * Enable this only if you wire up your own background tasks. */ enableBackgroundFetch?: boolean; /** Inject `ACCESS_BACKGROUND_LOCATION` on Android. Defaults to `true`. */ isAndroidBackgroundLocationEnabled?: boolean; /** Inject the foreground-service permissions on Android. Defaults to `true`. */ isAndroidForegroundServiceEnabled?: boolean; /** Inject `ACTIVITY_RECOGNITION` on Android. Defaults to `true`. */ isActivityRecognitionEnabled?: boolean; } declare const _default: ConfigPlugin; export default _default;