Despite the docs saying you should not sublcass `CKDatabaseOperation` I tried anyway and not suprising it didn't work. It causes an assertion failure.
Here's what I'm trying to do - I have a large number of records to add to a database. So I loop through my data and add a series of `CKModifyRecordsOperation` operations. Each one handles a set of records. I want to add one last operation to the database so I can run code after all of the other operations have completed. Or I might want to add a whole series of database operations to the database with my special operation added every so often to run specific code at key times as the other operations complete.
I realize that the `modifyRecordsCompletionBlock` block of the `CKModifyRecordsOperation` can be used but that block is already setup to do other things and archtiecturely it makes more sense for this special code to be added as just another database operation.
Any ideas for a proper solution? Subclassing `CKDatabaseOperation` would be ideal. I actually created my own `CKBlockDatabaseOperation` much like the standard `NSBlockOperation` class. But again, that fails since you can't subclass `CKDatabaseOperation` for some reason. My only solution so far is to use a `CKFetchRecordsOperation` on a simple known record and use its completion handler. But that's inefficient because I don't need to do a query for what I want.