Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

CKFetchRecordsOperationMBS class

Super class: CKDatabaseOperationMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class CloudKit MBS Mac64bit Plugin 16.5 Yes No No Yes, macOS only No
Function: A CKFetchRecordsOperation object retrieves CKRecord objects (whose IDs you already know) from iCloud.
Notes:
Use this operation to retrieve the entire contents of each record or only a subset of its contained values. As records become available, the operation object reports progress about the state of the operation to several different blocks, which you can use to process the results.

Fetching records is a common use of CloudKit, even if your app does not cache record IDs locally. For example, when you fetch a record related to the current record through a CKReference object, you use the ID in the reference to perform the fetch.

The blocks you assign to process the fetched records are executed serially on an internal queue managed by the fetch records operation. Your blocks must be capable of executing on a background thread, so any tasks that require access to the main thread must be redirected accordingly.

In addition to data records, a fetch records operation can fetch the current user record. The fetchCurrentUserRecordOperation() method returns a specially configured operation object that retrieves the current user record. That record is a standard CKRecord object whose contents are empty initially. You can add data to the user record and save it as needed. Because a discoverable user record can be accessed by other users of the app, never store sensitive personal information such as passwords in the user record. If you must store sensitive information about a user, do so in a separate record that is accessible only to that user.

The completed event is called after the operation executes and returns its results to you. You can use a completion block to perform housekeeping chores related to the operation, but do not use it to process the results of the operation itself. Any completion block you specify should be prepared to handle the failure of the operation to complete its task, whether due to an error or an explicit cancellation.
Subclass of the CKDatabaseOperationMBS class.

Feedback, Comments & Corrections

Super class CKDatabaseOperationMBS

Super class CKOperationMBS

This class has no sub classes.


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


CKFetchRecordChangesOperationMBS   -   CKFetchRecordZoneChangesOperationMBS





Links
MBS Xojo PDF Plugins