References
- •
./references/quickstart.md-- install, config plugin options, and code templates
Core Constraints
- •Treat
expo-widgetsas alpha; expect breaking changes. - •Use development builds. Expo Go does not support this library.
- •Target iOS only for widget/Live Activity behavior.
- •Ensure widget names used in code exactly match config plugin
widgets[].name.
Implementation Workflow
- •Install dependencies:
bash
npx expo install expo-widgets
- •
Configure plugin in app config (
app.json/app.config.*) with at least one widget entry:- •Set
widgets[].name,displayName,description, andsupportedFamilies. - •Keep
groupIdentifierconsistent between app and widget extension. - •Enable
enablePushNotificationsonly when push-updated Live Activities are required.
- •Set
- •
Regenerate native projects when config changes:
bash
npx expo prebuild
- •
Build and run an iOS development build (not Expo Go), then test on device/simulator.
- •
Implement widget rendering with
@expo/ui/swift-uicomponents and update data with:- •
updateWidgetSnapshotfor immediate single-entry updates - •
updateWidgetTimelinefor scheduled timeline entries
- •
- •
Implement Live Activities with:
- •
startLiveActivityto create and getactivityId - •
updateLiveActivityto refresh state byactivityId
- •
- •
Add interaction handling when needed:
- •
addUserInteractionListenerfor widget action events.
- •
Verification Checklist
- •
expo-doctorpasses after dependency/config changes. - •Plugin config contains valid widget families.
- •App group and bundle identifiers resolve to valid entitlements.
- •Widget appears in iOS widget gallery with expected name/description.
- •Snapshot/timeline updates render correctly across declared families.
- •Live Activity renders banner + Dynamic Island variants and updates with new data.