How to add live activity

Asked on 2024-07-27

1 search

To add a live activity to Apple Watch, you can follow the steps outlined in the sessions from WWDC 2024. Here are the key points:

  1. Automatic Appearance on Apple Watch:

    • In watchOS 11, your iOS live activity will automatically appear in the smart stack on Apple Watch. This happens without any changes to your existing code if you already have live activities on iOS (Bring your Live Activity to Apple Watch).
  2. Customizing Live Activity View:

    • You can customize the live activity view for Apple Watch by using the supplemental activity families modifier in Xcode. This allows you to provide a custom view when presented on Apple Watch (Bring your Live Activity to Apple Watch).
    • To do this, add the supplemental activity families modifier to your activity configuration. This will make the system prefer your custom content view over the default dynamic island views (What’s new in watchOS 11).
  3. Previewing and Testing:

    • You can preview how your live activity will appear in the smart stack using Xcode's preview feature. This helps ensure that your customizations look as expected on the Apple Watch (Bring your Live Activity to Apple Watch).
  4. Handling Updates and Connectivity:

    • Ensure your live activity is showing the most up-to-date information by managing update frequency and budgeting. Apple Watch live activity updates are synchronized automatically with iOS, and you don't need to manage separate push tokens (Bring your Live Activity to Apple Watch).
  5. Broadcasting Updates:

    • You can broadcast updates to a large audience using push notifications. This ensures that the live activity has the latest information across multiple devices (Broadcast updates to your Live Activities).

For a detailed walkthrough, you can refer to the sessions:

These sessions provide comprehensive guidance on how to implement and customize live activities for Apple Watch.