<!--
{
  "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/Configuration/automaticallySync",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:8CloudKit12CKSyncEngineC13ConfigurationV17automaticallySyncSbvp"
  },
  "title" : "automaticallySync"
}
-->

# automaticallySync

A Boolean value that determines whether the engine syncs automatically.

```
var automaticallySync: Bool
```

## Discussion

By default, the sync engine uses the system scheduler to automatically schedule both send and fetch operations.
If an operation fails due to a recoverable error, such as a network failure or when the server is enforcing request limits, the engine reschedules those operations as necessary.
Unless you have a specific need, prefer to use the default behavior in your app.

If you set this property’s value to `false`, use [`fetchChanges(_:)`](/documentation/CloudKit/CKSyncEngine-5sie5/fetchChanges(_:)) and [`sendChanges(_:)`](/documentation/CloudKit/CKSyncEngine-5sie5/sendChanges(_:)) to invoke immediate sync operations, allowing for more control over when your app syncs its records.
For example, you may want to sync at a specific time of day or deterministically simulate certain conditions in your unit tests.

The default value is `true`.

---

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)