ActivityKit lets you start, update, and end Live Activities that show real-time app data on the Lock Screen and in the Dynamic Island. You define the data a Live Activity displays by conforming a type to ActivityAttributes and packaging its dynamic state in ActivityContent, then manage the activity's life cycle through the Activity class as it moves between the cases of ActivityState. Use ActivityAuthorizationInfo to check whether the user permits Live Activities, drive remote updates with PushType, and tailor presentation with types such as AlertConfiguration and ActivityUIDismissalPolicy.
Live Activities 3
Create and manage the life cycle of a Live Activity that displays real-time data on the Lock Screen and in the Dynamic Island.
- ClActivityThe object you use to start, update, and end a Live Activity.
- EnActivityStateThe enum that describes the state of a Live Activity in its life cycle.
- EnActivityStyleAn enumeration of the presentation styles available for a Live Activity.
Defining Activity Data 2
Describe the static and dynamic data a Live Activity presents.
- PrActivityAttributesThe protocol you implement to describe the content of a Live Activity.
- StActivityContentA structure that describes the state and configuration of a Live Activity.
Authorization 2
Determine whether the user permits your app to start Live Activities and handle related errors.
- ClActivityAuthorizationInfoAn object with information about whether a person allowed your app to start Live Activities and permitted
- EnActivityAuthorizationErrorAn error that indicates why the request to start a Live Activity failed.
Remote Updates 1
Update and end Live Activities through push notifications.
- StPushTypeThe structure that offers constants you use to configure a Live Activity to receive updates through ActivityKit
Presentation and Dismissal 2
Configure alerts and control how a Live Activity is dismissed from the screen.
- StAlertConfigurationA structure you use to configure an alert that appears when you update your Live Activity.
- StActivityUIDismissalPolicyThe structure that describes when the system should remove a Live Activity that ended.