---
title: conversationContext
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitextinputtraits/conversationcontext
---

# conversationContext

A reference to a conversation, such as a mail or messaging thread.

## Declaration

```swift
optional var conversationContext: UIConversationContext? { get set }
```

## Mentioned in

Adopting Smart Reply in your messaging or email app

## Discussion

Discussion Set this conversation context before the keyboard appears; the keyboard uses this context to initialize its conversation context value. When updates occur in the conversation, call conversationContext(_:didChange:) on the inputDelegate property for UITextInput objects, such as UITextView/inputDelegateorUITextField/inputDelegate``.
