---
schema_version: "1"
id: 2e1eb1ba57cf675a68d06b966fdcfa9fadd4fc826522d1f51afc8cc705afc7fd
title: ConversationUIContainer
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/genai/agentforce-mobile-sdk/references/ios/conversation-ui-container-ios.md
canonical_url: https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/conversation-ui-container-ios.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4ecb9961b79b8e565c9fe38bafb391872c08ced49dd26bc2aa3c5c68dfc07d48
products:
  - Agentforce Mobile SDK
  - Agentforce and Einstein Generative AI
---
# ConversationUIContainer

## Overview

The main conversation interface container for the Agentforce SDK. A SwiftUI view that provides a complete conversational AI interface with message display, user input, voice interaction, and multi-modal content.

## Declaration

```swift
@MainActor struct ConversationUIContainer
```

## Properties

| Property         | Type        | Description                                                 |
| ---------------- | ----------- | ----------------------------------------------------------- |
| `body`           | `some View` | The main view content (inherited from View)                 |
| `alternateTitle` | `String?`   | Optional custom title to display in the conversation header |

## Methods

| Method                    | Signature                                               | Description                                                                                                                                      |
| ------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `updateSession(session:)` | `func updateSession(session: AgentConversation) throws` | Updates the conversation session with a new session instance                                                                                     |
| `sendUtterance(_:)` ⚠️    | `func sendUtterance(_ utterance: String)` ⚠️            | **Deprecated:** Messages should be sent using [AgentforceConversation.sendUtterance](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-conversation-ios.md#sendutterance)               |
| `resetChat()` ⚠️          | `func resetChat()` ⚠️                                   | **Deprecated:** The chat should be cleared using [AgentforceConversation.reset](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-conversation-ios.md#reset)                            |
| _Inherited from View_     | _All View protocol methods_                             | Inherits all standard SwiftUI View methods and modifiers. See [View (_Apple Developer_)](https://developer.apple.com/documentation/swiftui/view) |

## Integration Patterns

### Modal Presentation

```swift
.sheet(isPresented: $showConversation) {
    ConversationUIContainer(
        viewModel: conversationViewModel,
        flagProvider: featureFlags,
        onClose: { showConversation = false }
    )
}
```

### Navigation Integration

```swift
NavigationView {
    ConversationUIContainer(
        viewModel: conversationViewModel,
        flagProvider: featureFlags,
        onClose: { navigationController.popViewController() }
    )
}
```

### Full-Screen Presentation

```swift
.fullScreenCover(isPresented: $showFullScreen) {
    ConversationUIContainer(
        viewModel: conversationViewModel,
        flagProvider: featureFlags,
        onClose: { showFullScreen = false }
    )
}
```
