<!--
{
  "availability" : [
    "iOS: 9.3.0 -",
    "iPadOS: 9.3.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 9.2.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKOperation/longLivedOperationWasPersistedBlock",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKOperation(py)longLivedOperationWasPersistedBlock"
  },
  "title" : "longLivedOperationWasPersistedBlock"
}
-->

# longLivedOperationWasPersistedBlock

The closure to execute when the server begins to store callbacks for the long-lived operation.

```
var longLivedOperationWasPersistedBlock: (() -> Void)? { get set }
```

## Discussion

If your app exits before CloudKit calls this property’s value, the system doesn’t include the operation’s ID in the results of calls to the [`allLongLivedOperationIDs()`](/documentation/CloudKit/CKContainer/allLongLivedOperationIDs()) method.

For more information, see [`Long-Lived Operations`](/documentation/CloudKit/CKOperation#Long-Lived-Operations).

---

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)