LiveActivityState

State of a droplet's compact live activity.

struct LiveActivityState

State of a droplet's compact live activity. nil on the publisher means "no activity, release the slot".

Initializers

init(priority:accessibilityTitle:isInteractive:joinsPersistentActivitySet:)

init(priority: Int, accessibilityTitle: String, isInteractive: Bool = false, joinsPersistentActivitySet: Bool = false)

Creates an activity state without a hoisted compact presentation.

This overload remains the DroppyKit 0.6.1 ABI entry point. Keep it alongside the metadata-aware overload so compiled 0.6.1 droplets do not have to resolve a different initializer symbol.

init(priority:accessibilityTitle:isInteractive:joinsPersistentActivitySet:compactPresentation:)

init(priority: Int, accessibilityTitle: String, isInteractive: Bool = false, joinsPersistentActivitySet: Bool = false, compactPresentation: CompactLiveActivityPresentationMetadata?)

Creates an activity state, optionally describing a product-owned leading compact accessory that the host may hoist safely.

This exact overload is the 0.6.2 ABI entry point; the widget-targeting overload below carries the 0.7.0 additions.

init(priority:accessibilityTitle:isInteractive:joinsPersistentActivitySet:compactPresentation:expandedWidgetID:)

init(priority: Int, accessibilityTitle: String, isInteractive: Bool = false, joinsPersistentActivitySet: Bool = false, compactPresentation: CompactLiveActivityPresentationMetadata?, expandedWidgetID: String?)

Creates an activity state that also declares which of the droplet's widgets a pill/island tap expands into (DroppyKit 0.7.0).

Properties

accessibilityTitle

let accessibilityTitle: String

Accessibility title for the activity pill.

compactPresentation

let compactPresentation: CompactLiveActivityPresentationMetadata?

Product-neutral metadata for a host that mounts a shadowing droplet's leading compact accessory outside the clipping surface. nil means the activity uses the ordinary compact mount only.

expandedWidgetID

let expandedWidgetID: String?

The shelf widget a tap on this activity's pill or island seat should expand into, or nil to let the host pick the droplet's first declared widget (the pre-0.7.0 behavior). The id must match one of the droplet's own ShelfWidgetProviding descriptor ids; anything else falls back to the first descriptor (DroppyKit 0.7.0).

isInteractive

let isInteractive: Bool

True when the expanded activity accepts pointer interaction.

joinsPersistentActivitySet

let joinsPersistentActivitySet: Bool

True when the activity joins the host's persistent live-activity set: it may own the collapsed surface at rest and detach into the secondary activity pill when another activity owns it. False keeps the activity hover-only: the host reveals it while the pointer is over the collapsed surface and never pins it.

Pinning is a strong claim on someone else's notch. Default it off and let the user turn it on.

priority

let priority: Int

Priority when several droplets want the compact slot at once. Higher wins; the host resolves ties in registration order.