---
title: NSFileProviderSearching
framework: fileprovider
role: symbol
role_heading: Protocol
path: fileprovider/nsfileprovidersearching
---

# NSFileProviderSearching

A protocol you implement to support searching in your file provider.

## Declaration

```swift
protocol NSFileProviderSearching : NSObjectProtocol
```

## Overview

Overview Implement this protocol in your provider’s principal class to support searching files in cloud storage. To make search available to the person using the device, also set the property supportsStringSearchRequest to true. tip: You don’t need to implement this protocol if you only want to expose the contents of the working set to system search. When the person using the device performs a search, the system calls the NSFileProviderSearching implementation for all the accounts they’ve chosen to search. Your implementation returns a NSFileProviderSearchEnumerator, which receives repeated callbacks to enumerateSearchResults(for:startingAt:) until one of the following occurs: The system has received enough results. The system has received all results. The person enters another character into the query string, thereby canceling this search and starting another. The person explicitly cancels the search.

## Topics

### Implementing search

- [searchEnumerator(for:)](fileprovider/nsfileprovidersearching/searchenumerator(for:).md)
- [NSFileProviderStringSearchRequest](fileprovider/nsfileproviderstringsearchrequest.md)
- [NSFileProviderSearchEnumerator](fileprovider/nsfileprovidersearchenumerator.md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
