---
title: perShareResultBlock
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckacceptsharesoperation/pershareresultblock
---

# perShareResultBlock

The block to execute as CloudKit processes individual shares.

## Declaration

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

## Discussion

Discussion The closure returns no value and takes the following parameters: The share metadata to process. A Result that contains either: The accepted share An error that contains information about a problem encountered processing the share metadata. The operation executes this closure once for each element in the shareMetadatas 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.
