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.


iOS

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

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

Or in Package.swift:

Package.swift
.package(url: "https://github.com/Damayantha/chatty-ios-sdk", from: "1.0.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.

Android

Published on Maven CentralmavenCentral() is already in the default Gradle setup, so just add the dependency:

app/build.gradle.kts
dependencies {
    implementation("com.personaliai:chatty-android-sdk:1.0.0")
}

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())

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.

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