<!--
{
  "availability" : [
    "iOS: 8.0.0 - 10.0.0",
    "iPadOS: 8.0.0 - 10.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.10.0 - 10.12.0",
    "tvOS: 9.0.0 - 10.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 3.0.0 - 3.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKFetchRecordChangesOperation/fetchRecordChangesCompletionBlock",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKFetchRecordChangesOperation(py)fetchRecordChangesCompletionBlock"
  },
  "title" : "fetchRecordChangesCompletionBlock"
}
-->

# fetchRecordChangesCompletionBlock

The block to execute when the system finishes processing all changes.

```
var fetchRecordChangesCompletionBlock: ((CKServerChangeToken?, Data?, (any Error)?) -> Void)? { get set }
```

## Discussion

The block returns no value and takes the following parameters:

- `serverChangeToken`: The new change token from the server. You can store this token locally and use it during subsequent fetch operations to limit the results to records that the system changes after executing the operation.
- `clientChangeToken`: The most recent client change token from the device. If the change token isn’t the most recent change token you provided, the server might not have received the associated changes.
- `operationError`: An error object that contains information about a problem, or `nil` if the system successfully retrieves the changes.

When implementing this block, check the [`moreComing`](/documentation/CloudKit/CKFetchRecordChangesOperation/moreComing) property of the operation object to verify that the server was able to deliver all results. If that property is <doc://com.apple.documentation/documentation/Swift/true>, you must create another operation object using the value in the `serverChangeToken` parameter to fetch any remaining changes.

The operation object executes this block only once at the conclusion of the operation. It executes after all individual change blocks, but before the operation’s completion block. The block executes serially with respect to the other progress blocks of the operation.

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)