Video hosted by Apple at devstreaming-cdn.apple.com

Configure player

Close

WWDC Index does not host video files

If you have access to video files, you can configure a URL pattern to be used in a video player.

URL pattern

preview

Use any of these variables in your URL pattern, the pattern is stored in your browsers' local storage.

$id
ID of session: tech-talks-111467
$eventId
ID of event: tech-talks
$eventContentId
ID of session without event part: 111467
$eventShortId
Shortened ID of event: tech-talks
$year
Year of session: 2026
$extension
Extension of original filename: mp4
$filenameAlmostEvery
Filename from "(Almost) Every..." gist: ...

Tech Talk 111467

Bring Live Activities to Mac

2026 • macOS • 7:40

Discover how to drive Live Activities from your Mac app. Explore how Live Activities appear in the menu bar and Dynamic Island. Learn how to define your data model, create compact and expanded views with SwiftUI, and drive interactive updates using App Intents.

Speaker: Jonathan Tilley

Open in Apple Developer site

Downloads from Apple

HD Video (39 MB)
SD Video (14.4 MB)

Transcript

The Dynamic Island has come to the Mac. To fully take advantage of its capabilities, Mac apps now support native Live Activities. I’m Jonathan Tilley, and I’m an engineer on the Mac System Experience team. Let’s talk about those native Live Activities. First, what is a Live Activity? A Live Activity is a UI element that provides glanceable, timely progress of an activity.

It tracks updates of the current status of the activity over a few hours. Finally, a Live Activity allows quick actions and responses to displayed information. Live Activities are available on the inner display of iPhone Duo and outer, in StandBy mode, and CarPlay dashboard, in the Smart Stack of Apple Watch and iPad, and in the menu bar of your Mac, mirrored from your nearby iOS device.

In addition to being mirrored from your nearby iOS devices, now in macOS Golden Gate, applications running on the Mac can create Live Activities directly. Universal applications with existing Live Activities will work on the Mac with no code change, and native macOS apps can create Live Activities directly through the Live Activities API. On a Mac with Dynamic Island, Live Activities blend in seamlessly into the top edge of the device.

On other devices and displays, they are shown in the menu bar. Live Activities are already present on the Mac, displayed by various system apps and activities, from alarms and timers, to currently playing music and videos, to receiving and handling FaceTime and phone calls. Live Activities from other apps seamlessly blend in and interact with these system Live Activities. So, I’ve got a great use for Live Activities. I volunteer with a community theater, and I want to help the cast and crew stay in sync during a production.

I’ve made an app that allows the production team to keep track of the progress of the show. It uses a Live Activity to show if the curtain is open or closed and which act and scene we’re in. Live Activities are a great way to keep folks in sync while not interrupting what they’re currently doing on their Mac or iPhone. So let’s pull back the curtain.

To build that Live Activity, first, I need to define what kind of information I want to display. I do that by defining my data model. A Live Activity’s data model has two parts: the static data, which is consistent across the lifetime of a particular Live Activity. For my activity here, that would be something like the name of the show, or how many acts the show has. The second part is the dynamic data. This data updates over time, such as which act or scene we’re currently at in the show, or if the curtain is open or closed.

I define this data via ActivityAttributes: let values for my static data, like the scenes in each act and the title of our show, and vars for dynamically updating state: if the show is running, the curtain is open, and which act and scene we’re in. Next, I’ll build the view.

The Live Activity is visible in two modes: either compact, where it nestles in neatly and provides glanceable, unobtrusive status for the activity, or expanded, where it can offer richer UI and details for the activity. An activity is only expanded when interacted with or if explicitly triggered through an alert request. Only a single Live Activity can be expanded at a time, so we reserve that for high-priority updates or an update that requires some interaction.

I define all the views for my Live Activity inside the ActivityConfiguration. The compact Live Activity view is created inside the Dynamic Island view builder: a compact leading view, here I’m showing the status glyph of the curtain, and a compact trailing view, here showing the Roman numeral of the current act. These views are shown when the Live Activity is the only activity present. When the Live Activity needs to share space with another Live Activity, a minimal view is used, here containing that same status glyph.

Expanded Live Activity views are defined in two ways. The menu bar expanded Live Activity view is created along with the ActivityConfiguration as a simple view, here showing the title, status of the curtain, act, and scene status. Expanded Live Activities in the Dynamic Island are defined with the Dynamic Island view builder. The expanded view is shown when a user taps or clicks on the Live Activity, or I have alerted it for a high-priority update.

Each distinct region of the Dynamic Island can be used to host custom views. Here I use the leading region for open/closed status of the curtain, the trailing for my act label, the center for which scene we’re at, and the bottom for my combined act and scene progress bar. This same code works on iOS and macOS. For more details, check out the documentation on creating custom views for Live Activities.

Apps can start Live Activities in a few different ways: immediate based on some state happening on the device, scheduled at a specific time in the future, or pushed remotely to the device via push notification. Live Activities integrate with existing backgrounding technologies on the Mac, like background tasks and user agents, so it’s easy to start, stop, and manage them.

Okay, now it’s showtime. We’re going to start up this Live Activity since the show is about to begin. The lighting technician has a server sending out updates based on lighting cues. The app running on the cast and crew’s Mac receives this update and starts a Live Activity. This Live Activity will give my crew all the details they need for where we are in the show and will continue to update as the show progresses. Updating the already running Live Activity is as easy as mutating that state on the ActivityConfiguration, such as updating the curtainOpen state to false, creating an updated ActivityContent with that state, and pushing the content to the existing activity via the update call.

Now I want to talk about actions. I’m adding a 5-minute check-in feature that allows the team to mark that they are ready for the next act. I’ll add a “Places” check-in mode, showing a “Ready” button to confirm everyone is at places. Tapping “Ready” or “Not Ready” will fire off an action for my app to take.

Actions can be exposed to the Live Activity via App Intents, just like for other widgets and controls. I can define an action via the AppIntent protocol. Here, I update the user’s selected placesReady value and supply that change to the Live Activity via the same activity update API I used earlier.

I can associate the trigger with an action. Here, I tied the actions of a “Not Ready” and a “Ready” button to trigger that SetPlacesReadyIntent I just defined. Once the activity has finished, either from an on-device change or from time passing, it’s easy to terminate the Live Activity. I can simply call end on the activity with a specific policy on how I want the dismissal handled. Live Activities can also be hidden or terminated via swipe gestures, or through a context menu.

Now it’s your time to shine. To get started, define the data you want to show in your Live Activity using ActivityConfiguration. Go and write the views that give glanceable status for your activity using WidgetKit and SwiftUI’s Dynamic Island. Make your activity dynamic with actions driven by App Intents. Update your view with live changes as they happen and finally terminate it when it’s no longer relevant via ActivityKit.

If you have an iOS activity, there’s no code to port. Your iOS Live Activity will run smoothly as part of your universal application. For Mac-only apps, it’s easy to create one for the first time. Okay, places everyone. The show is about to start, and your new Live Activity is a star.