<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GroupActivities",
  "identifier" : "/documentation/GroupActivities/GroupActivityMetadata/lifetimePolicy-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Group Activities"
    ],
    "preciseIdentifier" : "s:15GroupActivities0A16ActivityMetadataV14lifetimePolicyAC08LifetimeF0Vvp"
  },
  "title" : "lifetimePolicy"
}
-->

# lifetimePolicy

Determines how an activity can be ended.

```
var lifetimePolicy: GroupActivityMetadata.LifetimePolicy
```

## Discussion

Most activities can be left or ended independently by any participant.
For example, a game being played together or a TV show being watched together
doesn’t depend on a particular participant to be able to continue for everyone else.

Some activities, though, might depend on the initiator’s presence in the activity
for it to continue.  For example, the initiator might be sharing a photo that
belongs to them, or a file from their device.  Setting [`lifetimePolicy`](/documentation/GroupActivities/GroupActivityMetadata/lifetimePolicy-swift.property)
to [`endsWhenInitiatorLeaves`](/documentation/GroupActivities/GroupActivityMetadata/LifetimePolicy-swift.struct/endsWhenInitiatorLeaves) in these cases would ensure that
the activity ends when the initiator leaves.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)