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

# SRTextInputSession

The characters a user types for a particular keyboard.

```
class SRTextInputSession
```

## Overview

The framework instantiates a new instance of this class every time the keyboard displays after dismissal.

## Topics

### Identifying the Session

[`var sessionIdentifier: String`](/documentation/SensorKit/SRTextInputSession/sessionIdentifier)

A unique identifier for the keyboard session.

### Timing Text Input

[`var duration: TimeInterval`](/documentation/SensorKit/SRTextInputSession/duration)

The length of time, in seconds, that the session spans.

### Inspecting Text Source

[`var sessionType: SRTextInputSession.SessionType`](/documentation/SensorKit/SRTextInputSession/sessionType-swift.property)

[`enum SessionType`](/documentation/SensorKit/SRTextInputSession/SessionType-swift.enum)

Methods to input text during a session.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)