<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKSyncEngine-5sie5/fetchChanges(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:8CloudKit12CKSyncEngineC12fetchChangesyyAC05FetchF7OptionsVYaKF"
  },
  "title" : "fetchChanges(_:)"
}
-->

# fetchChanges(_:)

Fetches pending remote changes from the server.

```
final func fetchChanges(_ options: CKSyncEngine.FetchChangesOptions = .init()) async throws
```

## Parameters

`options`

The options to use when fetching changes. For more information, see [`CKSyncEngine.FetchChangesOptions`](/documentation/CloudKit/CKSyncEngine-5sie5/FetchChangesOptions).

## Discussion

Use this method to request the sync engine immediately fetches all pending remote changes before your app continues.
This isn’t necessary in normal use, as the engine automatically syncs your app’s records.
It is useful, however, in scenarios where you require more control over sync, such as pull-to-refresh or unit tests.

> Note: ``doc://com.apple.cloudkit/documentation/CloudKit/CKSyncEngine-5sie5/fetchChanges(_:)`` returns only after your sync delegate finishes processing all related fetch events.

> Throws: An error if the fetch operation fails. Common errors include network failures, authentication issues, or server-side problems.

---

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)