deleteRecord(withID:)
Deletes a specific record.
Declaration
@discardableResult func deleteRecord(withID recordID: CKRecord.ID) async throws -> CKRecord.IDParameters
- recordID:
The identifier of the record to delete.
Return Value
The identifier of the deleted record.
Discussion
Deleting a record may cause additional deletions if other records in the database reference the deleted record. CloudKit doesn’t provide the identifiers of any additional records it deletes. This method throws an error if the request fails, such as when the records doesn’t exist, the network is unavailable or the device doesn’t have an active iCloud account.
For information on a more convenient way to delete records, see modifyRecords(saving:deleting:savePolicy:atomically:).