Instance Method

initWithRecordZonesToSave:recordZoneIDsToDelete:

Initializes and returns an operation object configured to save and delete the specified record zones.

Declaration

- (instancetype)initWithRecordZonesToSave:(NSArray<CKRecordZone *> *)recordZonesToSave recordZoneIDsToDelete:(NSArray<CKRecordZoneID *> *)recordZoneIDsToDelete;

Parameters

recordZonesToSave

An array of CKRecordZone objects representing the record zones to save. You may specify nil for this parameter.

recordZoneIDsToDelete

An array of CKRecordZoneID objects representing the record zones you want to delete, if any. You may specify nil for this parameter.

Return Value

An initialized operation object.

Discussion

The record zones you intend to save or delete must all reside in the same database, which you specify when configuring the operation object. Deleting a record zone also deletes any records it contains. Trying to delete a record zone that does not exist in the current database returns an error.

See Also

Initializing the Operation Object