<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKSystemSharingUIObserver/systemSharingUIDidSaveShareBlock-8c9vi",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So25CKSystemSharingUIObserverC8CloudKitE06systemB19UIDidSaveShareBlockySo10CKRecordIDC_s6ResultOySo7CKShareCs5Error_pGtcSgvp"
  },
  "title" : "systemSharingUIDidSaveShareBlock"
}
-->

# systemSharingUIDidSaveShareBlock

A callback block the system invokes after the success or failure of a share save by the system sharing UI.

```
@preconcurrency var systemSharingUIDidSaveShareBlock: (@Sendable (CKRecord.ID, Result<CKShare, any Error>) -> Void)? { get set }
```

## Discussion

Following a successful share save by the system sharing UI in the provided [`CKContainer`](/documentation/CloudKit/CKContainer), the system invokes this callback with a `nonnull` [`CKRecord.ID`](/documentation/CloudKit/CKRecord/ID), a `nonnull` share, and a `nil` error.

If a save failure occurs due to a per-item error like [`CKError.Code.serverRecordChanged`](/documentation/CloudKit/CKError/Code/serverRecordChanged), the system invokes this callback with a `nonnull` [`CKRecord.ID`](/documentation/CloudKit/CKRecord/ID), a `nil` share, and a `nonnull` error.

Each [`CKSystemSharingUIObserver`](/documentation/CloudKit/CKSystemSharingUIObserver) instance has a private serial queue. The system uses this queue for all callback block invocations.

---

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)