One Logo Pool Ball
GroupActivities · IOS API REFERENCE

GroupActivityMetadata.LifetimePolicy

struct · iOS 18.0+ · SDK 27.1

struct LifetimePolicy

An activity lifetime policy used by a Group Activity. Activities that share content owned by the initiator may wish to customize their lifetime policy so that the activity ends when the initiator leaves.

Members (2)

get · iOS 18.0+

endsWhenInitiatorLeaves

TypeScript
static get endsWhenInitiatorLeaves(): GroupActivityMetadata_LifetimePolicy
Swift declaration
static let endsWhenInitiatorLeaves: GroupActivityMetadata.LifetimePolicy

The activity should end when the initiator of the activity leaves. This case should be used in the rare instances where the initiator of the activity owns what is being shared; for example, activities that share photos or slides that exclusively belong to the initiator of the activity would use this so that when they leave the group session, the content will no longer be shared. >Important: The majority of SharePlay apps should use the ``automatic`` policy, instead.

get · iOS 18.0+

automatic

TypeScript
static get automatic(): GroupActivityMetadata_LifetimePolicy
Swift declaration
static let automatic: GroupActivityMetadata.LifetimePolicy

The default lifetime policy for a group activity. Initiators and participants will have the option to leave the activity independently or end it for everyone. When everyone has left the activity, it will end. This case should be used by most apps and allows activities to continue until all participants leave the activity – regardless of which participant happens to have initiated the activity.

Skipped declarations

No declarations were skipped in this snapshot.

All GroupActivities types →