<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKSyncEngineRecordZoneChangeBatch/initWithRecordsToSave:recordIDsToDelete:atomicByZone:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKSyncEngineRecordZoneChangeBatch(im)initWithRecordsToSave:recordIDsToDelete:atomicByZone:"
  },
  "title" : "initWithRecordsToSave:recordIDsToDelete:atomicByZone:"
}
-->

# initWithRecordsToSave:recordIDsToDelete:atomicByZone:

Creates a batch of records to modify.

```
- (instancetype) initWithRecordsToSave:(NSArray<CKRecord *> *) recordsToSave recordIDsToDelete:(NSArray<CKRecordID *> *) recordIDsToDelete atomicByZone:(BOOL) atomicByZone;
```

## Parameters

`recordsToSave`

The records to save.

`recordIDsToDelete`

The identifiers of the records to delete.

`atomicByZone`

A Boolean value that determines whether CloudKit modifies the specified records atomically by record zone.

## Return Value

An initialized change batch.

## Discussion> Important: When using this initializer to create batches, consider the number of records you specify and their combined size.
> If you specify too many records, or their combined size is too large, the send operation may fail with an error of type ``doc://com.apple.cloudkit/documentation/CloudKit/CKError/Code/limitExceeded``.

---

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)