---
schema_version: "1"
id: 0c41751b69516bed0fc6fd836824fb1d9c8cea09f37ee71e739596aac12febf1
title: AgentforceLauncher
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/genai/agentforce-mobile-sdk/references/ios/agentforce-launcher-ios.md
canonical_url: https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-launcher-ios.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9d67a1ce4ff150278425a3badaafeb60690c3a235d70a6f9338cb8a5e364225a
products:
  - Agentforce Mobile SDK
  - Agentforce and Einstein Generative AI
---
# AgentforceLauncher

`struct AgentforceLauncher`

A SwiftUI view that provides a floating launcher interface for accessing the Agentforce conversation UI.

## Overview

The `AgentforceLauncher` serves as the primary entry point for users to interact with the Agentforce AI assistant. It displays as a persistent, floating interface element that shows conversation status and provides multiple ways to initiate or continue conversations.

## Declaration

```swift
@MainActor struct AgentforceLauncher
```

## Properties

| Property               | Type                       | Description                                                                       |
| ---------------------- | -------------------------- | --------------------------------------------------------------------------------- |
| body                   | some View                  | The launcher's UI implementation                                                  |
| openTranscribing       | (() -> Void)?              | Callback to open the conversation with voice input active                         |
| openWithKeyboardClosed | (((() -> Void)?) -> Void)? | Callback to open the conversation without keyboard, optionally running completion |
| openWithKeyboardOpen   | (() -> Void)?              | Callback to open the conversation with keyboard input ready                       |

## Example Usage

```swift
// Create launcher with conversation view model
let launcher = AgentforceLauncher(
    viewModel: conversationViewModel,
    launchChatView: {
        presentConversationUI()
    }
)

// Embed in your app's main view
ZStack {
    MainAppContent()
    VStack {
        Spacer()
        HStack {
            Spacer()
            launcher
                .padding()
        }
    }
}
```
