How can I launch a live activity from a co trip
Generated on 8/1/2024
1 search
To launch a live activity from a control, you can follow these steps:
-
Add a Value for the Supports Launch Attribute: In the build settings for your watch app target, add a value for the
supportsLaunchForLiveActivity
attribute type key in theInfo.plist
section. This will enable your watch app to launch for all your live activities. If you want to launch for only specific live activities, leave the value empty and add an item for each activity attributes conforming type that should launch the watch app. -
Customize Your Live Activity View: You can preview how your live activity view will appear in the smart stack using the Xcode preview by adding the supplemental activity families modifier. This allows you to provide a custom view when presented on Apple Watch.
For more detailed guidance, you can refer to the session Bring your Live Activity to Apple Watch (05:05).
Relevant Sessions

Broadcast updates to your Live Activities
With broadcast push notifications, your app can send updates to thousands of Live Activities with a single request. We’ll discover how broadcast push notifications work between an app, a server, and the Apple Push Notification service, then we’ll walk through best practices for this capability and how to implement it.

What’s new in watchOS 11
Explore new opportunities on Apple Watch, including bringing Double Tap support to your watchOS app, making your Smart Stack widgets even more relevant and interactive, and displaying your iOS Live Activities in the Smart Stack.

Design Live Activities for Apple Watch
Starting in watchOS 11, Live Activities from your iOS app will automatically appear in the Smart Stack on a connected Apple Watch. Learn how to optimize the layout of your Live Activity for the wrist, and provide the right level of information and interactivity at the right time.

Bring your Live Activity to Apple Watch
Bring Live Activities into the Smart Stack on Apple Watch with iOS 18 and watchOS 11. We’ll cover how Live Activities are presented on Apple Watch, as well as how you can enhance their presentation for the Smart Stack. We’ll also explore additional considerations to ensure Live Activities on Apple Watch always present up-to-date information.