One Logo Pool Ball
ActivityKit · IOS API REFERENCE

PushType

struct · iOS 16.1+ · SDK 27.1

struct PushType

The structure that offers constants you use to configure a Live Activity to receive updates through ActivityKit push notifications. Pass the ``ActivityKit/PushType/token`` constant to the ``ActivityKit/Activity/request(attributes:contentState:pushType:)`` function to start a Live Activity that receives content updates with ActivityKit push notifications. Pass ``ActivityKit/PushType/channel(_:)`` to ``ActivityKit/Activity/request(attributes:contentState:pushType:)`` function to specify that you want to use a broadcast channel instead of a token. You can only specify one ``PushType``. To learn more about using ActivityKit push notifications to update your Live Activity, see <doc:starting-and-updating-live-activities-with-activitykit-push-notifications>.

Members (2)

get · iOS 16.1+

token

TypeScript
static get token(): PushType
Swift declaration
static var token: PushType { get }

A constant you use to configure a Live Activity that updates its dynamic content by receiving ActivityKit push notifications.

static · iOS 18.0+

channel

TypeScript
static channel(name: string): PushType
Swift declaration
static func channel(_ name: String) -> PushType

A constant to configure a Live Activity that updates its dynamic content for broadcast channels. The channel ID is a base64-encoded string. For information on creating a channel, refer to <doc://com.apple.documentation/documentation/usernotifications/sending-channel-management-requests-to-apns>. The code snippet below is an example of how to specify that you want to use a broadcast push channel. ```swift Activity.request(attributes: attributes, content: content, pushType: .channel("c29tZUNoYW5uZWw=")) ```

Skipped declarations

No declarations were skipped in this snapshot.

All ActivityKit types →