Build iOS Live Activities on Windows: KXBuild Handles Extensions, Dynamic Island, and APNs Push
This tutorial removes the macOS requirement for one of Apple's most engaging features: developers on Windows can now build, sign, and ship Live Activities using KXBuild. The push mechanics and the strict limits (4 KB payload, 8-hour lifespan) are practical constraints that shape real-world use, and the step-by-step approach makes the whole pipeline reproducible.
KXBuild, a VSCode plugin and CLI for building iOS apps on Windows, adds a Live Activity widget extension to a SwiftUI project with one command. The extension contains both a regular widget and an ActivityConfiguration that renders lock screen and Dynamic Island styles. Data is split into immutable attributes and a mutable ContentState; the app and extension must hold identical definitions. The app starts an activity with Activity.request, updates its state with activity.update, and ends it with activity.end. For server-driven updates, pushType: .token yields a per-activity push token delivered through pushTokenUpdates. APNs pushes use the liveactivity push type and a topic constructed from the app's bundle ID plus .push-type.liveactivity. A Node.js script signs a JWT with a .p8 key and sends test pushes to the sandbox or production endpoint. The tutorial also covers signing profiles, debugging with F5, common failure modes, and packaging a Release IPA that includes the extension.
The requirement to keep an identical ActivityAttributes definition in both the app and the widget extension invites maintainability hazards; a single field change must be mirrored or the Live Activity will fail to decode.
The 4 KB payload limit and the 8-hour cap push Live Activity design toward short, event-driven status displays rather than long-running trackers, which constrains the kinds of use cases that fit.
Shipping a Node.js script for APNs pushes demonstrates that the push pipeline is independent of Xcode, making it feasible to automate entirely from a Windows environment.