Platforms to show: All Mac Windows Linux Cross-Platform
CKFetchRecordsOperationMBS class
Super class: CKDatabaseOperationMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CloudKit | MBS Mac64bit Plugin | 16.5 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
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.
- 3 events
- event fetchRecordsCompleted(recordsByRecordID as Dictionary, operationError as NSErrorMBS)
- event RecordCompleted(record as CKRecordMBS, recordID as CKRecordIDMBS, error as NSErrorMBS)
- event RecordProgress(recordID as CKRecordIDMBS, progress as Double)
- 7 methods
- method Constructor
- method Constructor(recordIDs() as CKRecordIDMBS)
- method desiredKeys as String()
- method Destructor
- method recordIDs as CKRecordIDMBS()
- method setDesiredKeys(desiredKeys() as String)
- method setRecordIDs(IDs() as CKRecordIDMBS)
- shared method fetchCurrentUserRecordOperation as CKFetchRecordsOperationMBS
Super class CKDatabaseOperationMBS
- property database as CKDatabaseMBS
- method Constructor
Super class CKOperationMBS
- 2 events
- event Completed
- event LongLivedOperationWasPersisted
- 8 properties
- property configuration as CKOperationConfigurationMBS
- property Handle as Integer
- property operationID as String
- 7 methods
- method cancel
- method Constructor
- method Destructor
- method isCancelled as boolean
- method isExecuting as boolean
- method isFinished as boolean
- method start
This class has no sub classes.
The items on this page are in the following plugins: MBS Mac64bit Plugin.
CKFetchRecordChangesOperationMBS - CKFetchRecordZoneChangesOperationMBS