Cannot delete a record in CloudKit

Viewed 1922

I am using CloudKit for my iOS app. I created a method to delete record by ID.

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.

PS: The deletion works fine as long as I delete records created by the same app instance.

   class func removeFavoriteEntryFromCloud(favoriteID id: String) {

    //Create the record
    let favoriteID = CKRecordID(recordName: id)

    privateDatabase.deleteRecordWithID(favoriteID) { (id: CKRecordID?, error: NSError?) -> Void in
        if error == nil {
            print("successfuly deleted record", id ?? "nil")
        }
    }

}

Here are my Roles in dashboard:

Here are my Roles in dashboard

Of course I use the same iCloud user account on the devices for my test.

Is that a bug in CloudKit Development Environment?

1 Answers
Related