<!--
{
  "availability" : [
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FileProvider",
  "identifier" : "/documentation/FileProvider/NSFileProviderSearchEnumerator",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "File Provider"
    ],
    "preciseIdentifier" : "c:objc(pl)NSFileProviderSearchEnumerator"
  },
  "title" : "NSFileProviderSearchEnumerator"
}
-->

# NSFileProviderSearchEnumerator

A protocol that defines methods for providing search results and canceling searches.

```
protocol NSFileProviderSearchEnumerator : NSObjectProtocol
```

## Overview

Implement this protocol by implementing the [`enumerateSearchResults(for:startingAt:)`](/documentation/FileProvider/NSFileProviderSearchEnumerator/enumerateSearchResults(for:startingAt:)) method to perform your search and deliver pages of results to the [`NSFileProviderSearchEnumerationObserver`](/documentation/FileProvider/NSFileProviderSearchEnumerationObserver) that you receive as the first parameter.

## Topics

### Providing search results

[`enumerateSearchResults(for:startingAt:)`](/documentation/FileProvider/NSFileProviderSearchEnumerator/enumerateSearchResults(for:startingAt:))

Enumerates search results starting from the specified page, in response to a call from the framework.

[`NSFileProviderSearchEnumerationObserver`](/documentation/FileProvider/NSFileProviderSearchEnumerationObserver)

A protocol that defines a type that receives enumerations of search results from your extension.

[`NSFileProviderPage`](/documentation/FileProvider/NSFileProviderPage)

A synchronization point that represents the next batch of items to be returned by an enumerator.

### Canceling a search

[`invalidate()`](/documentation/FileProvider/NSFileProviderSearchEnumerator/invalidate())

Cancels a currently-running enumeration, in respone to a call from the framework.



---

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)