One Logo Pool Ball
ActivityKit · IOS API REFERENCE

Activity

class · iOS 16.1+ · SDK 27.1

class Activity<Attributes> where Attributes : ActivityAttributes

The object you use to start, update, and end a Live Activity. The `Activity` object offers functionality to start, update, and end a Live Activity from within your app. You can update or end a Live Activity while your app is in the background, but you can only start a Live Activity while the app is in the foreground, unless you adopt <doc://com.apple.documentation/documentation/appintents> and start the Live Activity using a <doc://com.apple.documentation/documentation/appintents/liveactivityintent>. Additionally, `Activity` offers functionality to observe changes to: * The Live Activity * The Live Activity's state in its life cycle * A person's permission to start Live Activities * The Live Activity's push token if you configure it to receive updates through ActivityKit push notifications. To observe these changes, use the asynchronous sequences the activity object offers; for example, use the ``ActivityKit/Activity/activityStateUpdates-swift.property`` sequence to observe changes to the state of a Live Activity.

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

10 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

Activity.request(attributes:contentState:pushType:)

This declaration needs Swift generic type arguments. (no canonical witness for Attributes)

Activity.request(attributes:content:pushType:)

This declaration needs Swift generic type arguments. (no canonical witness for Attributes)

Activity.request(attributes:content:pushType:style:)

This declaration needs Swift generic type arguments. (no canonical witness for Attributes)

Activity.request(attributes:content:pushType:style:alertConfiguration:start:)

This declaration needs Swift generic type arguments. (no canonical witness for Attributes)

Activity.request(attributes:content:pushType:style:alertConfiguration:startDate:)

This declaration needs Swift generic type arguments. (no canonical witness for Attributes)

Activity.activities

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

Activity.activityUpdates

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

Activity.pushToStartTokenUpdates

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

Activity.pushToStartToken

The containing type needs Swift generic type arguments. (no canonical witness for Attributes)

Activity.attributes

This declaration needs Swift generic type arguments. (no canonical witness for Attributes)

All ActivityKit types →