---
title: "performSearch(query:options:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uifindsession/performsearch(query:options:)"
---

# performSearch(query:options:)

Initiates a search for the query string you provide.

## Declaration

```swift
func performSearch(query: String, options: UITextSearchOptions?)
```

## Parameters

- `query`: The string to search, the user provides through the search text field of the system find panel.
- `options`: The object containing all the configurable options for the search.

## Discussion

Discussion The system calls this method when the user initiates a search for a string in your app’s text content.

## See Also

### Managing session interactions

- [performSingleReplacement(query:replacementString:options:)](uikit/uifindsession/performsinglereplacement(query:replacementstring:options:).md)
- [replaceAll(searchQuery:replacementString:options:)](uikit/uifindsession/replaceall(searchquery:replacementstring:options:).md)
- [highlightNextResult(in:)](uikit/uifindsession/highlightnextresult(in:).md)
- [invalidateFoundResults()](uikit/uifindsession/invalidatefoundresults().md)
