Platforms to show: All Mac Windows Linux Cross-Platform

Back to CKQueryOperationMBS class.

CKQueryOperationMBS.queryCompleted(cursor as CKQueryCursorMBS, operationError as NSErrorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No
The block to execute with the search results.

The block returns no value and takes the following parameters:

cursor: A CKQueryCursorMBS object that indicates there are more results to fetch or nil if the results parameter contains all of the remaining search results. Use the provided object to initialize a new query operation object when you are ready to retrieve the next batch of results.
operationError: An error object containing information about a problem, or nil if the results are retrieved successfully.

This block is executed only once and represents your last chance to process the operation results. It is executed after all of the individual progress blocks but before the operation’s completion block. The block is executed serially with respect to the other progress blocks of the operation. If you intend to use this block to process results, update the value of this property before executing the operation or submitting the operation object to a queue.

When the results of a query operation are known, the operation object uses this block to deliver the available set of records to your app. If the number of records exceeds the value in resultsLimit, the operation object provides an opaque data object in the cursor parameter of your block that you can use to retrieve the next batch of results. You must create a separate operation object using that cursor to get the next batch of results.

CKQueryOperationMBS.recordFetched(record as CKRecordMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event CloudKit MBS Mac64bit Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No
The event to execute for each record returned by the query.

record: A CKRecordMBS object matching the search criteria.

After identifying and sorting the records, the operation object executes this block once for each record in the sorted results. The block is executed serially with respect to all progress blocks of the operation object, so you can expect only one block at a time to be executing for this operation object.

If you intend to use this block to process results, set it before executing the operation or submitting the operation object to a queue.

Warning
Query indexes are updated asynchronously so they are not guaranteed to be current. If you query for records that you recently changed and not allow enough time for those changes to be processed, the query results may be incorrect. The results may not contain the correct records and the records may be out of order.

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...