<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKModifyRecordZonesOperation",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKModifyRecordZonesOperation"
  },
  "title" : "CKModifyRecordZonesOperation"
}
-->

# CKModifyRecordZonesOperation

An operation that modifies one or more record zones.

```
class CKModifyRecordZonesOperation
```

## Overview

After you create one or more record zones, use this operation to save those zones to the database. You can also use the operation to delete record zones and their records.

If you assign a handler to the <doc://com.apple.documentation/documentation/Foundation/Operation/completionBlock> property of the operation, CloudKit calls the handler after the operation executes and returns its results. Use the handler to perform housekeeping tasks for the operation, but don’t use it to process the results of the operation. The handler you provide should manage any failures of the operation, whether due to an error or an explicit cancellation.

## Topics

### Creating a Modify Zones Operation

[`init(recordZonesToSave:recordZoneIDsToDelete:)`](/documentation/CloudKit/CKModifyRecordZonesOperation/init(recordZonesToSave:recordZoneIDsToDelete:))

Creates an operation for modifying the specified record zones.

[`initWithRecordZonesToSave:recordZoneIDsToDelete:`](/documentation/CloudKit/CKModifyRecordZonesOperation/initWithRecordZonesToSave:recordZoneIDsToDelete:)

Creates an operation for modifying the specified record zones.

[`init()`](/documentation/CloudKit/CKModifyRecordZonesOperation/init())

Creates an empty modify record zones operation.

### Configuring the Modify Zones Operation

[`recordZonesToSave`](/documentation/CloudKit/CKModifyRecordZonesOperation/recordZonesToSave)

The record zones to save to the database.

[`recordZoneIDsToDelete`](/documentation/CloudKit/CKModifyRecordZonesOperation/recordZoneIDsToDelete)

The IDs of the record zones to delete permanently from the database.

### Processing the Modify Zones Results

[`modifyRecordZonesCompletionBlock`](/documentation/CloudKit/CKModifyRecordZonesOperation/modifyRecordZonesCompletionBlock)

The closure to execute after CloudKit modifies all of the record zones.



---

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)