A protocol defining methods a delegate object or app extension uses to handle communication from the on-device index.


protocol CSSearchableIndexDelegate


The CSSearchableIndexDelegate protocol defines methods that a delegate object or an app extension can use to handle communication from the on-device index. Apps that are long-running or that perform batch updates to the index should implement the required methods of this protocol in either a delegate object or an app extension.

The index delegate methods are called when there is an issue with the index and more information is needed from an app. For example, the methods can be called when the entire index is lost or there was a failure to process data for some identifiers.


Updating the Index

func searchableIndex(CSSearchableIndex, reindexAllSearchableItemsWithAcknowledgementHandler: () -> Void)

Tells the delegate to reindex all searchable data and clear all local state information.


func searchableIndex(CSSearchableIndex, reindexSearchableItemsWithIdentifiers: [String], acknowledgementHandler: () -> Void)

Tells the delegate to reindex the searchable items associated with the specified identifiers.


Getting Information About Indexing

func searchableIndexDidThrottle(CSSearchableIndex)

Tells the delegate that indexing is being throttled.

func searchableIndexDidFinishThrottle(CSSearchableIndex)

Tells the delegate that the index throttling has finished.


Inherits From

See Also

Setting the Delegate

var indexDelegate: CSSearchableIndexDelegate?

The delegate object that can handle index-management tasks.