Contents

init(for:content:dynamicIsland:)

Creates a configuration object for a Live Activity.

Declaration

@MainActor @preconcurrency init<Content>(for attributesType: Attributes.Type, @ViewBuilder content: @escaping (ActivityViewContext<Attributes>) -> Content, dynamicIsland: @escaping (ActivityViewContext<Attributes>) -> DynamicIsland) where Content : View

Parameters

  • attributesType:

    The type that describes the content of the Live Activity.

  • content:

    A closure that creates the view for the Live Activity that appears on the Lock Screen. This view also appears as a banner on the Home Screen of devices that don’t support the Dynamic Island when you alert a person about updated Live Activity content.

  • dynamicIsland:

    A closure that builds the Live Activity that appears in the Dynamic Island.

See Also

Creating a Live Activity configuration