how do you create a Live Activity in iOS 17?

Generated on 9/6/2024

1 search

To create a Live Activity in iOS 17, you can follow the guidance provided in the session "Bring your Live Activity to Apple Watch" from WWDC 2024. Although the session primarily focuses on integrating Live Activities with Apple Watch, it provides insights into how Live Activities function and can be customized.

Here are some key points from the session:

  1. Automatic Appearance: In iOS 18 and watchOS 11, your existing iOS Live Activity will automatically appear in the smart stack on Apple Watch. This means that if you have a Live Activity on iOS, it will be visible on the Apple Watch without additional code changes.

  2. Customization: You can customize the Live Activity view for Apple Watch by using the supplemental activity families modifier. This allows you to provide a custom view when the Live Activity is presented on Apple Watch.

  3. Previewing: You can preview how your Live Activity will appear in the smart stack using Xcode's preview feature. This helps ensure that your Live Activity looks great and provides the best information possible.

  4. Design Considerations: The session "Design Live Activities for Apple Watch" discusses visual guidelines and how to craft a great Live Activity, emphasizing the importance of glanceability and relevance.

For more detailed steps and code examples, you might want to refer to the session Bring your Live Activity to Apple Watch (03:22) where customization for Apple Watch is discussed.