delete(withRecordZoneID:completionHandler:)
Deletes a specific record zone.
Declaration
func delete(withRecordZoneID zoneID: CKRecordZone.ID, completionHandler: @escaping @Sendable (CKRecordZone.ID?, (any Error)?) -> Void)func deleteRecordZone(withID zoneID: CKRecordZone.ID) async throws -> CKRecordZone.IDParameters
- zoneID:
The identifier of the record zone to delete.
- completionHandler:
The closure to execute after CloudKit deletes the record zone.
Discussion
The completion handler takes the following parameters:
The identifier of the deleted record zone, or
nilif there’s an error.An error if a problem occurs, or
nilif CloudKit successfully deletes the record zone.
For information on a more convenient way to delete record zones, see modifyRecordZones(saving:deleting:).