<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "OpenDirectory",
  "identifier" : "/documentation/OpenDirectory/ODQuery/synchronize()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Open Directory"
    ],
    "preciseIdentifier" : "c:objc(cs)ODQuery(im)synchronize"
  },
  "title" : "synchronize()"
}
-->

# synchronize()

Restarts a query, disposing of any results it has obtained.

```
func synchronize()
```

## Discussion

If the query was originally scheduled in a run loop with [`schedule(in:forMode:)`](/documentation/OpenDirectory/ODQuery/schedule(in:forMode:)), the delegate is called with `inResults` set to `nil`, `[inError code]` set to `kODErrorQuerySynchronize`, and `[inError domain]` set to `kODErrorDomainFramework`.

---

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)