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:

  1. 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 the Info.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.

  2. 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

  1. Bring your Live Activity to Apple Watch
  2. Design Live Activities for Apple Watch
  3. Broadcast updates to your Live Activities
  4. What’s new in watchOS 11