> ## Documentation Index
> Fetch the complete documentation index at: https://chatbase.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# iOS SDK Overview

> Introduction to the Chatbase iOS SDK, a Swift library for building conversational AI experiences on iOS and macOS.

> [!NOTE]
>
> **Beta Release.** The Chatbase iOS SDK is currently in beta (v0.1.0-beta.1). APIs may change in future releases.

> [!TIP]
>
> **Want the full chat without building a UI?** Load the chat in a WebView. It's the simplest way to add your agent to an app, with the same chat, actions, forms, tickets and voice as your website. See [Mobile apps](https://chatbase.co/docs/developer-guides/website-integration/iframe.md#mobile-apps). Use the SDK when you want your own native chat UI.

> [!WARNING]
>
> Conversation methods apply exclusively to conversations created through the mobile SDKs (iOS and Android). Conversations generated through the widget, the API, or external integrations cannot be accessed using the SDK. A user identified on both platforms sees their iOS and Android SDK conversations together.

## What is the Chatbase iOS SDK?

The Chatbase iOS SDK is a Swift library that lets you add Chatbase AI agents to your iOS or macOS app. It gives you:

* **Real-time streaming** with `async`/`await` and per-chunk callbacks
* **Client-side tools** that let the AI agent run functions on the device
* **User identity** with JWT sign-in and an automatic device ID
* **Conversation management** with paginated history
* **Ready-made SwiftUI state** through `ConversationState` and `ConversationListState`
* **Typed errors** for everything that can go wrong

> [!NOTE]
>
> Everything in the SDK lives in one module, `ChatbaseSDK`. A single `import ChatbaseSDK` gives you every type in these docs.

## Requirements

iOS 17.0 or macOS 14.0, Swift 6.0, and Xcode 16. See [Installation & Quickstart](https://chatbase.co/docs/ios-sdk/quickstart.md) for the full prerequisites and setup.

## Logging

The SDK writes to Apple's logging system under the subsystem `com.chatbase.sdk`, in three categories:

| Category | What it logs |
| - | - |
| `APIClient` | Each request and response: method, path, status, duration, size |
| `ChatService` | Stream decoding failures and tool result retries |
| `ConversationState` | Skipped retries and similar UI state notes |

View them in Console.app, or run `log stream --predicate 'subsystem == "com.chatbase.sdk"'`. Message text is never logged.

## Rate Limits

Chatbase allows **1,000 requests every 10 seconds** per device. Going over throws an `APIError.httpError` with status `429`. See [Error Handling](https://chatbase.co/docs/ios-sdk/error-handling.md).

## Next Steps

> **[Installation & Quickstart](https://chatbase.co/docs/ios-sdk/quickstart.md)**
>
> Add the SDK to your project and send your first message

> **[Streaming](https://chatbase.co/docs/ios-sdk/streaming.md)**
>
> Stream replies with async/await and callbacks

> **[SwiftUI](https://chatbase.co/docs/ios-sdk/swiftui.md)**
>
> Ready-made state for chat screens

> **[Client-Side Tools](https://chatbase.co/docs/ios-sdk/client-side-tools.md)**
>
> Let the AI agent run functions on the device

> **[Conversations](https://chatbase.co/docs/ios-sdk/conversations.md)**
>
> Conversations, history, and pagination

> **[User Identity](https://chatbase.co/docs/ios-sdk/user-identity.md)**
>
> Sign users in with JWT tokens

> **[Error Handling](https://chatbase.co/docs/ios-sdk/error-handling.md)**
>
> Error types and how to handle them


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.