Contents

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.ID

Parameters

  • 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 nil if there’s an error.

  • An error if a problem occurs, or nil if CloudKit successfully deletes the record zone.

For information on a more convenient way to delete record zones, see modifyRecordZones(saving:deleting:).

See Also

Modifying Record Zones