With Live Actions, your app can provide real-time, visible information like weather updates, flight departure times, or until dinner arrives — right on the lock screen. What’s more, thanks to live features like Dynamic Island on the iPhone 14 Pro and iPhone 14 Pro Max, live activities can be really fun too.
Ask Apple’s evangelists, designers, and engineers to answer your questions about Live Actions and Dynamic Island. Here are a few highlights of those discussions, including sizing and styling guidelines, when to dismiss a live activity, and why widgets and live activities are different (except they aren’t).
How can I update Live Activity without using Apple’s Push Notification Service (APN)?
Your app can use pre-existing background functionality such as location services to deliver live activity updates on demand. You can also use BGProcessingTask and background pushers to provide fewer updates to your live activity. Note that these background tasks are not automatically performed by the system. You can read more below:
Showing live data with live activities
The 4-hour default for disabling live activity is too long for my use case. What are the cancellation guidelines after a live event ends?
You can submit one when you complete a live activity. ActivityUIDismissalPolicy
To tell the system when to dismiss your UI. Alternatively, you can choose to dismiss the live activity immediately or after a certain period of time.
How does my app know when someone dismisses a live activity?
of Activity.activityUpdates
static var is an asynchronous sequence that notifies updates to all live activities of your application, including those that are dismissed. Alternatively, the activityStateUpdates
If your application already has a reference to a live activity, it will declare a new state from the async sequence.
When an app is force quit, is the associated live activity dismissed?
Live Activity lifecycles are not tied to the host application process, so they persist if the application is terminated. The lifecycle of your widget extension is also different. It’s entirely possible that different states of the widget extension are called to provide views for the same live activity, so it’s not necessary to store any state locally in the widget extension.
How are live activities and widgets different?
Live activities and widgets both provide information that can be viewed in real-time. Live activities are great for displaying contextual information related to the next task someone has started. Good examples include catering, sports activities and flight departure times. Widgets can always provide useful at-a-glance information. Good examples include to-do lists, this week’s weather forecast, or how close someone is to closing their ring on their Apple Watch.
While both live activities and widgets rely on WidgetKit to house their UI, they are configured slightly differently. Live Activities is a single view that updates programmatically, while widgets consist of a timeline of pre-built views.
Should my live activity try to change the background color of the dynamic island?
A dynamic island is very immersive when you don’t provide a background color or image – think of it as a canvas for front view components. Additional design guidance is provided in the Human Interface Guidelines.
Human interface guidelines – live activities
Do live activities support interactive buttons?
Live actions on the lock screen and dynamic island do not support interactive buttons or other controls. Including buttons in your live activity can confuse someone into thinking they can interact with the view. For this reason, you should avoid displaying anything that looks like a button in your UI.
The best user experience is inside your app, which is why every interaction with live action results in opening your app. Live Activity lock screen presentation and expanded presentation can include multiple links to your app, so you can provide different access depending on the context of your live activity.
Are live activities the only way to support a dynamic island?
Your app can also implement other system services, such as CallKit and Now Playing, from the system UI in the Dynamic Island. However, Live Activities is the only way for your app to present its own UI in the dynamic island.
Is it possible to add animations to dynamic island?
While there is no support for random animations in your Live Motion views, your app can change how Live Motion content updates from one state to another. Read more in the “Animate Content Updates” section of the article below.
Showing live data with live activities
Where can I find more documents about live activities?
The ActiveKit documentation provides a lot of information about implementing live activities, including how to update and stop live activities using APNs. In addition, the Human Interface Guide provides design guidelines and recommended sizes for different approaches. You can also find some inspiration from the WWDC22 food truck sample project.
Human interface guidelines – live activities
Showing live data with live activities
Update and complete your live activity with ActiveKit push notifications
Activity kit
Gadget kit