<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKFetchShareMetadataOperation/perShareMetadataResultBlock",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So29CKFetchShareMetadataOperationC8CloudKitE03perbC11ResultBlocky10Foundation3URLV_s0H0OySo07CKShareC0Cs5Error_pGtcSgvp"
  },
  "title" : "perShareMetadataResultBlock"
}
-->

# perShareMetadataResultBlock

The closure to execute as the operation fetches individual shares.

```
var perShareMetadataResultBlock: ((URL, Result<CKShare.Metadata, any Error>) -> Void)? { get set }
```

## Discussion

The closure returns no value and takes the following parameters:

- The share’s URL.
- A <doc://com.apple.documentation/documentation/Swift/Result> that contains either:
  - The share metadata, or
  - An error that contains information about a problem encountered fetching the share metadata.

The operation executes this closure once for each URL in the [`shareURLs`](/documentation/CloudKit/CKFetchShareMetadataOperation/shareURLs) property. Each time the closure executes, it executes serially with respect to the other closures of the operation.

If you intend to use this closure to process results, set it before you execute the operation or submit the operation to a queue.

---

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)