Platforms to show: All Mac Windows Linux Cross-Platform
CKFetchRecordChangesOperationMBS 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 type of operation object to optimize fetch operations for locally managed sets of records. Specifically, use it when you maintain a local cache of your record data and need to synchronize that cache periodically with the server.
To get the most benefit out of a CKFetchRecordChangesOperation object, you must maintain a local cache of the records from the specified zone. Each time you fetch changes from that zone, the server provides a token that identifies your request. With each subsequent fetch request, you initialize the operation object with the token from the previous request, and the server returns only the records that changed since that request.
The blocks you assign to process the fetched records are executed serially on an internal queue managed by the 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.
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.
Available in 10.10 and newer and deprecated with 10.12.
Subclass of the CKDatabaseOperationMBS class.
- 3 events
- event fetchRecordChangesCompleted(serverChangeToken as CKServerChangeTokenMBS, clientChangeTokenData as MemoryBlock, operationError as NSErrorMBS)
- event recordChanged(record as CKRecordMBS)
- event recordWithIDWasDeleted(recordID as CKRecordIDMBS)
- 4 properties
- property moreComing as Boolean
- property previousServerChangeToken as CKServerChangeTokenMBS
- property recordZoneID as CKRecordZoneIDMBS
- property resultsLimit as Integer
- 4 methods
- method Constructor(recordZoneID as CKRecordZoneIDMBS, previousServerChangeToken as CKServerChangeTokenMBS)
- method desiredKeys as String()
- method Destructor
- method setDesiredKeys(desiredKeys() as String)
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.
CKFetchNotificationChangesOperationMBS - CKFetchRecordsOperationMBS