<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "swift: 4.2.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKModifyRecordZonesOperation/init(recordZonesToSave:recordZoneIDsToDelete:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So28CKModifyRecordZonesOperationC8CloudKitE06recordC6ToSave0g7ZoneIDsH6DeleteABSaySo08CKRecordJ0CGSg_SaySo0mJ2IDCGSgtcfc"
  },
  "title" : "init(recordZonesToSave:recordZoneIDsToDelete:)"
}
-->

# init(recordZonesToSave:recordZoneIDsToDelete:)

Creates an operation for modifying the specified record zones.

```
convenience init(recordZonesToSave: [CKRecordZone]? = nil, recordZoneIDsToDelete: [CKRecordZone.ID]? = nil)
```

## Parameters

`recordZonesToSave`

The record zones to save. You can specify `nil` for this parameter.

`recordZoneIDsToDelete`

The IDs of the record zones to delete. You can specify `nil` for this parameter.

## Discussion

The record zones you intend to save or delete must all reside in the same database, which you specify when you configure the operation. If you delete a record zone, CloudKit deletes any records it contains.

---

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)