---
title: perShareCompletionBlock
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckacceptsharesoperation/persharecompletionblock
---

# perShareCompletionBlock

The block to execute as CloudKit processes individual shares.

## Declaration

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

## Discussion

Discussion The closure returns no value and takes the following parameters: The share metadata to process. The share, or nil if CloudKit can’t process the share metadata. If CloudKit can’t process the share metadata, this parameter provides information about the failure; otherwise, it’s nil. 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.

## See Also

### Processing the Share Accept Results

- [shareMetadatas](cloudkit/ckacceptsharesoperation/sharemetadatas.md)
- [acceptSharesCompletionBlock](cloudkit/ckacceptsharesoperation/acceptsharescompletionblock.md)
