<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextSearchingFindSession",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UITextSearchingFindSession"
  },
  "title" : "UITextSearchingFindSession"
}
-->

# UITextSearchingFindSession

A find session object that wraps a searchable object implementing the text-searching protocol.

```
@MainActor class UITextSearchingFindSession
```

## Overview

Implement the [`UITextSearching`](/documentation/UIKit/UITextSearching-53wjq) protocol on the class that encapsulates the searchable content for your view to use an instance of [`UITextSearchingFindSession`](/documentation/UIKit/UITextSearchingFindSession) as the session object. Alternatively, you can subclass [`UIFindSession`](/documentation/UIKit/UIFindSession) to manage the details of the session using a custom class.

The find session’s reference to [`searchableObject`](/documentation/UIKit/UITextSearchingFindSession/searchableObject) is weakly held to avoid a retain cycle if the view you install the interaction on is the searchable object itself. Ensure that your app maintains a strong reference to the searchable object.

## Topics

### Creating a text searching find session

[`init(searchableObject: any __UITextSearching)`](/documentation/UIKit/UITextSearchingFindSession/init(searchableObject:)-9zc4e)

Initializes an object to manage the search for the searchable object you specify.

[`convenience init<SearchableObject>(searchableObject: SearchableObject)`](/documentation/UIKit/UITextSearchingFindSession/init(searchableObject:)-7swl5)

Initializes an object to manage the search for the searchable object you specify.

### Getting the searchable object

[`var searchableObject: (any __UITextSearching)?`](/documentation/UIKit/UITextSearchingFindSession/searchableObject)

The object to search, responsible for performing the search operation and decorating the results.

## Relationships

### Inherits From

[`UIFindSession`](/documentation/UIKit/UIFindSession)

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)