CKModifyRecordsOperation records limit?

I'm trying to delete many records with one CKModifyRecordsOperation and getting this error:

<CKError 0x600000dbe4f0: "Limit Exceeded" (27/1020); "Your request contains 552 items which is more than the maximum number of items in a single request (400)">

This obviously means, that Modify Operation has record limit of 400 which is equal to CKQueryOperation.maximumResults. The good solution here would be to chunk the array of records into subarrays with length less than 400 and add multiple delete operations to the database.

The only problem is that the limit for CKModifyRecordsOperation is neither documented nor provided with a constant, so it's basically a magic number.

In hope that my prayers would be heard I want to ask to add maximumResults constant to CKModifyRecordsOperation.

  • **Update: ** turns out CKQueryOperation.maximumResults is actually equals to 0, so the value is hidden. But the general idea is to give some way to split records in chunks so CKModifyRecordsOperation will not fail.

Add a Comment

Replies

Or you can wipe the repository clean and start over via the cloud kit console.

@MobileTen we do not discuss here how to wipe repository, good luck to find better application for your sparkling wisdom!

  • You're the one in need of the luck., you're the one asking the question, and you're the one faced with the issue, so it's up to you to either use the Cloudk Kit Console to resolve your issues, and it's up to you to decide if you're going to work within the constraints of the developer limitations of the API and stop thinking Apple is going to bend the rules for you.

  • @MobileTen, Ok, thank you

Add a Comment