<!--
{
  "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/CKModifyRecordZonesOperation/perRecordZoneDeleteBlock-6c82y",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So28CKModifyRecordZonesOperationC8CloudKitE03perB15ZoneDeleteBlockySo08CKRecordH2IDC_s6ResultOyyts5Error_pGtcSgvp"
  },
  "title" : "perRecordZoneDeleteBlock"
}
-->

# perRecordZoneDeleteBlock

The closure to execute when CloudKit deletes a record zone.

```
var perRecordZoneDeleteBlock: ((CKRecordZone.ID, Result<Void, any Error>) -> Void)? { get set }
```

## Discussion

This property is a closure that returns no value and has the following parameters:

- The ID of the record zone that CloudKit deletes.
- A <doc://com.apple.documentation/documentation/Swift/Result> that contains either
  - A successful `Result`
  - An error that provides information about a failure deleting the record zone.

The closure executes once for each record zone in the [`recordZoneIDsToDelete`](/documentation/CloudKit/CKModifyRecordZonesOperation/recordZoneIDsToDelete) property. Each time the closure executes, it executes serially with respect to the other record zone completion blocks 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)