My Code:
let op = CKModifyRecordsOperation(recordIDsToDelete:recordIDsToDelete)
op.modifyRecordsCompletionBlock = { _, deleteRecordIDs, error in
if error == nil {
print("successful delete deleteRecordIDS = \(deleteRecordIDs)")
} else {
print("delete error = \(error?.localizedDescription)")
}
}
op.database = CKContainer.default().privateCloudDatabase
op.qualityOfService = .userInitiated
CKContainer.default().privateCloudDatabase.add(op)
My problem is that CKRecord are not deleted once I reinstall the app: when I reinstall the app and try to delete a CloudKit record, the method is executed successfully (error is nil) but the records are still in CloudKit Dashboards.