C
Chatty

Mobile SDKs

Add the Chatty chat experience to native apps. Each SDK renders a fully native UI — SwiftUI on iOS, Jetpack Compose on Android, native components on React Native — with no WebView.

Every SDK exposes the same two entry points:

  • ChattyLauncher — a floating chat button you overlay on your app.
  • ChattyChatView / ChattyChatScreen — a full-screen chat view you embed directly.

Both take your bot ID (find it in the dashboard under Embed & Integrate). Optional parameters: baseUrl/baseURL, host, position, and color.

v1.1.0+ adds native voice calling on all three platforms (ChattyVoiceCallView / ChattyVoiceCallScreen) — a live, full-duplex conversation with the bot, matching the web widget's voice call feature. It's opt-in per platform (see each section's "Voice calls" below) so apps that don't use it don't pay for LiveKit's dependency footprint.


iOS

Swift Package Manager. In Xcode: File → Add Package Dependencies, paste the URL and select version 1.1.0:

https://github.com/PersonaliAI/chatty-ios-sdk

Or in Package.swift:

Package.swift
.package(url: "https://github.com/PersonaliAI/chatty-ios-sdk", from: "1.1.0")

Also available via CocoaPods: pod 'ChattySDK', '~> 1.1.0'.

Floating launcher

RootView.swift
import SwiftUI
import ChattySDK
 
struct RootView: View {
    var body: some View {
        ContentView()
            .overlay(ChattyLauncher(botId: "YOUR_BOT_ID"))
    }
}

Full-screen chat

SupportView.swift
import SwiftUI
import ChattySDK
 
struct SupportView: View {
    var body: some View {
        ChattyChatView(botId: "YOUR_BOT_ID")
    }
}
Requires iOS 15+. No special Info.plist permissions are needed for basic chat; add NSPhotoLibraryUsageDescription only if visitors will upload images.

Voice calls

Ships as a separate product, ChattySDKVoice — add it as an extra Package Dependency in Xcode (or your Package.swift) alongside ChattySDK; it pulls in LiveKit's Swift SDK for you, and apps that only need ChattySDK are unaffected:

.library(name: "ChattySDKVoice", ...) // add alongside ChattySDK in Package Dependencies
SupportView.swift
import ChattySDKVoice
 
@State private var showCall = false
 
var body: some View {
    if showCall {
        ChattyVoiceCallView(client: client, sessionId: sessionId,
            widgetStyle: theme?.widget_style, onClose: { showCall = false })
    } else {
        ChattyChatView(botId: "YOUR_BOT_ID", onVoiceCallPress: { showCall = true })
    }
}

Also add NSMicrophoneUsageDescription to your app's Info.plist — the call fails silently on launch without it, since iOS kills the mic-access request rather than showing an error.


Android

Available via JitPack — no Maven Central account needed:

settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        maven { url = uri("https://jitpack.io") }
    }
}
app/build.gradle.kts
dependencies {
    implementation("com.github.PersonaliAI:chatty-android-sdk:v1.1.0")
}

Also published to Maven Central as com.personaliai:chatty-android-sdk, but that mirror currently lags behind (stuck at 1.0.0) — use the JitPack coordinate above for the latest release until Central catches up.

Floating launcher

AppRoot.kt
import androidx.compose.foundation.layout.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.personaliai.chatty.ChattyLauncher
 
@Composable
fun AppRoot() {
    Box(Modifier.fillMaxSize()) {
        // your app content
        ChattyLauncher(botId = "YOUR_BOT_ID")
    }
}

Full-screen chat

SupportScreen.kt
import androidx.compose.ui.Modifier
import androidx.compose.foundation.layout.fillMaxSize
import com.personaliai.chatty.ChattyChatScreen
 
ChattyChatScreen(botId = "YOUR_BOT_ID", modifier = Modifier.fillMaxSize())

Voice calls

Opt-in — only an app that renders the call screen needs LiveKit's (large, WebRTC-based) Android SDK pulled in:

build.gradle.kts (your app module)
dependencies {
    implementation("io.livekit:livekit-android:2.18.2") // or newer
}
Application.onCreate(), once
LiveKit.init(applicationContext)
SupportScreen.kt
var showCall by remember { mutableStateOf(false) }
if (showCall) {
    ChattyVoiceCallScreen(
        client = client,
        sessionId = sessionId, // the same session id ChattyChatScreen is using
        widgetStyle = state.theme?.widgetStyle,
        onClose = { showCall = false },
    )
} else {
    ChattyChatScreen(state = state, onVoiceCallPress = { showCall = true })
}

Also add <uses-permission android:name="android.permission.RECORD_AUDIO" /> to your AndroidManifest.xml and request it at runtime before showing the call screen.

ProGuard / R8

-keep class com.personaliai.chatty.** { *; }
Requires minSdk 24+ and Jetpack Compose.

React Native

Install from npm along with its peer dependency:

npm install @personaliai/react-native @react-native-async-storage/async-storage

Floating launcher

App.tsx
import { ChattyLauncher } from "@personaliai/react-native";
 
export default function App() {
  return (
    <>
      {/* ...your app... */}
      <ChattyLauncher botId="YOUR_BOT_ID" position="right" />
    </>
  );
}

Full-screen chat

SupportScreen.tsx
import { ChattyChatView } from "@personaliai/react-native";
 
export function SupportScreen() {
  return <ChattyChatView botId="YOUR_BOT_ID" />;
}
Requires React Native 0.72+. Renders real native components on both iOS and Android — no WebView.

Voice calls

The one feature that needs native linking — install its peer dependencies too, and call registerGlobals() once at app startup before creating any call:

npm install livekit-client @livekit/react-native @livekit/react-native-webrtc
index.js
import { registerGlobals } from "@livekit/react-native";
registerGlobals();
MyChat.tsx
import { ChattyChatView, ChattyVoiceCallView, ChattyClient } from "@personaliai/react-native";
 
function MyChat() {
  const [showCall, setShowCall] = useState(false);
  const client = useMemo(() => new ChattyClient({ botId: "YOUR_BOT_ID" }), []);
 
  if (showCall) {
    return (
      <ChattyVoiceCallView
        client={client}
        sessionId={sessionId} // the same session id ChattyChatView is using
        widgetStyle={theme?.widget_style}
        onClose={() => setShowCall(false)}
      />
    );
  }
  return <ChattyChatView botId="YOUR_BOT_ID" onVoiceCallPress={() => setShowCall(true)} />;
}

Add NSMicrophoneUsageDescription (iOS) and RECORD_AUDIO (Android) permissions — see LiveKit's own React Native setup docs for the platform-specific steps.


Common options

ParameterPlatformsDescription
botIdallRequired. Your bot's ID from the dashboard.
positionLauncherleft / right (RN), ChattyPosition (Android). Which side the floating button sits on.
colorallOverride the launcher/accent color (defaults to your bot's saved theme).
hostallReported as the parent host for the bot's domain-allowlist check.
baseUrl / baseURLallPoint the SDK at a custom API base URL (self-hosted / staging).

The chat session is created and persisted automatically per device — you don't manage session IDs yourself.

These SDKs call the same widget API as the web embed, so the bot's domain/host allowlist and plan quota apply. Leave the allowlist empty (or add your app's host) if calls are rejected.

What's next