save(_:completionHandler:)
Saves a specific record zone.
Declaration
func save(_ zone: CKRecordZone, completionHandler: @escaping @Sendable (CKRecordZone?, (any Error)?) -> Void)func save(_ zone: CKRecordZone) async throws -> CKRecordZoneParameters
- zone:
The record zone to save.
- completionHandler:
The closure to execute after CloudKit saves the record.
Discussion
The completion handler takes the following parameters:
The saved record zone (as it appears on the server), or
nilif there’s an error.An error if a problem occurs, or
nilif CloudKit successfully saves the record zone.
For information on a more convenient way to save record zones, see modifyRecordZones(saving:deleting:).