/** * Expo config plugin for `react-native-live-activity-kit`. * * Scaffolds a PURE-SwiftUI iOS Widget Extension that renders Live Activities. * No JavaScript runs inside the extension — the appex links only ActivityKit / * WidgetKit / SwiftUI and shares the `LiveActivityKitAttributes` type with the * app by bare name. Running JS in a widget appex is what triggers the * Hermes-in-appex blank-render bug; this plugin deliberately avoids it by never * embedding the React Native runtime in the extension. * * What it does, each as a discrete `withX` mod so failures are localised: * * 1. App `Info.plist` — `NSSupportsLiveActivities` (+ FrequentUpdates). * 2. App entitlements — `aps-environment` (push) + App Group (optional). * 3. EAS app-extension — register the appex under * `extra.eas.build.experimental.ios.appExtensions` so EAS Build provisions * a bundle id and (optional) App Group for the extension. Without this, * EAS-managed credentials don't know the appex exists and signing fails. * 4. Widget files — copy the SwiftUI + shared attributes file and * write the extension `Info.plist` / `.entitlements` (dangerous mod). * 5. Xcode target — add the app-extension `PBXNativeTarget`, embed it, * and depend on it (node-xcode; the fragile part — see * `withWidgetXcodeTarget`). * * Usage in `app.json` / `app.config.ts`: * * ["react-native-live-activity-kit", { * "widgetName": "MyLiveActivity", * "deploymentTarget": "16.2", * "appGroup": "group.com.acme.app", * "frequentUpdates": true, * "enablePush": true * }] */ import { ConfigPlugin } from "@expo/config-plugins"; export interface Options { /** Name of the widget extension target / folder. Default `LiveActivityKitWidget`. */ widgetName?: string; /** iOS deployment target for the extension. Default `16.2`. */ deploymentTarget?: string; /** * App Group id. When set, the App Groups entitlement (with this id) is added * to BOTH the app and the extension — needed only to share extra data * (images / large state), not for Live Activities themselves. */ appGroup?: string; /** * Add `NSSupportsLiveActivitiesFrequentUpdates` to the app Info.plist. * Default `false`. */ frequentUpdates?: boolean; /** * Ensure the `aps-environment` entitlement (development) on the APP target so * push-driven Live Activity updates work. Default `true`. */ enablePush?: boolean; } declare const _default: ConfigPlugin; export default _default;