Live Activities with Expo, End to End: Client and Backend
Blog post from Expo
Live Activities can provide real-time, glanceable progress for background tasks such as receipt processing by showing stages like received, processing, completed, or failed on the iPhone Lock Screen and Dynamic Island without reopening the app. The implementation described uses Expo and expo-widgets to define a fixed ActivityKit content-state schema and render native SwiftUI widget views from TSX, while supporting remote push-to-start on iOS 17.2 or later and graceful fallback on unsupported devices. Because Live Activity push tokens are per activity, can rotate, and differ from ordinary device tokens, the client must register them with the backend through both existing activity handles and a module-level listener for remotely started activities while the app remains backgrounded. The backend stores start and update tokens, maps changing domain events to the widget’s schema, sends APNs pushes to start and update activities across a user’s devices, recomputes state from the database to avoid race-condition errors, and removes invalid tokens. Important APNs details include required Live Activity headers, correctly wrapped and serialized content state, mandatory start-event attributes and alert data, matching the APNs environment to app entitlements, and preserving terminal states with update events rather than immediately ending the activity.
No tracked trend matches for this post yet.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.