Live Activities Part 1 - Problem Statement

I recently went on a quest for Live Activities. There’s a ton of gotchas or subtle notes that aren’t clearly mentioned. Think of the series as an unofficial rfc. Intro Example app - wwdc code - docs confusion points I saw Apple’s videos and docs on ActivityKit. They do a decent job of showing you 80% of the API and how Live Activity works. The remaining 20% is an enigma though....

April 16, 2025 · 4 min

Live Activities Part 2 - The missing doc

How do I begin development for Live Activities? Add a new† (widget) target to your app. Make sure you select ‘Live Activities’. Add the necessary plist items. Add push notification capability. Only needed if you want to start / update from server. If everything is done from within the app then you don’t need this. Example ‘Clock’ App on iPhone adds timers to your phone without any server interaction. Note: A widget is a specific kind of app extension....

April 16, 2025 · 4 min

Live Activities Part 3 - Development

Development How can I share classes between widget and app? Models must be shared across targets. App needs the model to manage its lifecycle (start, update, end, handling dismissed / stale activities). Widget needs the model to be able to present it. Each View should only get added to targets that needs them. Your widget must create views based on the models for all Live Activity presentations. Your app may need views if it has an in-app view related to the live activity....

April 16, 2025 · 13 min

Live Activities Part 4 - Debugging

Debugging Notification delivery issues Can you send Live Activity notifications to simulator? Yes. The token created by the simulator works. Just don’t use the simulator for testing application lifecycle behavior or background tasks as a may not properly simulate OS restrictions. Can you drag and drop payloads into the simulator? That didn’t work for me. How can you extract the key from the p8 file? It’s just plain text. There’s no decryption required....

April 16, 2025 · 9 min