<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/CSSearchableIndex/indexDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Spotlight"
    ],
    "preciseIdentifier" : "c:objc(cs)CSSearchableIndex(py)indexDelegate"
  },
  "title" : "indexDelegate"
}
-->

# indexDelegate

The delegate object that can handle index-management tasks.

```
weak var indexDelegate: (any CSSearchableIndexDelegate)? { get set }
```

## Discussion

The delegate should conform to the [`CSSearchableIndexDelegate`](/documentation/CoreSpotlight/CSSearchableIndexDelegate) protocol. Set this property to handle communication with the index and perform index-management tasks for your app. In particular, long-running apps should set a delegate so that the index can be updated while the app is in the background. Alternatively, you can create an extension with a request handler that conforms to the [`CSSearchableIndexDelegate`](/documentation/CoreSpotlight/CSSearchableIndexDelegate) protocol and let the extension perform index updates when your app isn’t running.

---

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)