Skip to content

Mobile SDKs

The mobile SDKs are the web widget’s equivalent for your own apps: your customers get in-app support with full conversation history and push notifications, and your agents see those conversations in the same Inbox. They are not agent apps for your team; those are a separate product line.

Platform Language and runtime Distribution Status
iOS Swift 5.9+, iOS 15+ Swift Package Manager, CocoaPods in development
Android Kotlin 1.9+, Android 8.0 (API 26)+ Maven Central in development
React Native wraps the native SDKs npm planned (beta)
Flutter wraps the native SDKs pub.dev planned (beta)

The native SDKs are authoritative; wrappers ship after them. Watch or TV apps and desktop SDKs are out of scope; use the web widget for desktop.

Text messaging, attachments, voice messages, images and video, anonymous and identified sessions, theming, custom avatar and branding, 40 languages, the AI concierge, conversation history, unread badges, push notifications, deep links, click-to-call through the phone’s dialler, offline queueing with background sync, biometric unlock for the chat, VoiceOver and TalkBack support, dark mode. Target compiled size: 5 MB or less per platform.

In-app WebRTC calls and screen sharing from the customer come in a later release. Cobrowse is web-only: mobile operating systems do not allow a third-party SDK to observe or control the screen.

Initialise once, early in the app lifecycle:

// iOS
let config = RolChatConfig(
siteId: "site_abc123",
apiKey: "pk_live_…", // public key - safe to ship in the app
region: .eu, // eu / us
theme: RolChatTheme(primaryColor: .blue)
)
RolChat.shared.initialize(config: config)
// Android
val config = RolChatConfig.Builder()
.siteId("site_abc123")
.apiKey("pk_live_…")
.region(Region.EU)
.theme(RolChatTheme(primaryColor = Color.Blue))
.build()
RolChat.initialize(context, config)

Identify the user after they sign in, and sign out when they do:

RolChat.shared.identify(userId: "user_12345", email: "alice@example.com", name: "Alice",
metadata: ["tier": "gold"])
RolChat.shared.logout() // on host-app sign-out, or the next user sees this history

Show the UI:

RolChat.shared.openChat() // modal
RolChat.shared.openChat(conversationId: id) // a specific conversation
RolChat.shared.openChatInline(view) // inside your own layout
RolChat.shared.close()

Callbacks: rolChatDidOpen, rolChatDidClose, rolChatDidReceiveMessage(_:), rolChatDidFailToSend(_:). The public API is main-thread safe on iOS and background-thread safe on Android; connections drop when the app backgrounds and resume on foreground.

  • Anonymous: a device session ID stored in the keychain or encrypted preferences survives app updates and is tied to the device, not the user. It is purged after 90 days of inactivity.
  • Identified: after identify, the session is promoted and merged with the anonymous history on the same device when unambiguous. Cross-channel identity resolution follows the identity graph rules and consent.
  • Trusted identification: your backend signs a token with the user’s claims; the SDK passes it and RolChat verifies the signature before promoting the session. Unsigned identify works but is lower trust.

The public API key in the app is safe by design: it is scoped to the site and rate-limited.

Platform Transport You provide
iOS APNs An APNs authentication key in the RolChat dashboard
Android FCM The FCM service account JSON
RolChat.shared.setPushToken(deviceToken, type: .apns)
if RolChat.shared.handleNotification(userInfo) { return } // consumed: a chat message

Notification text is localised server-side to the user’s locale. Rich notifications support avatar, reply from the notification and mark as read. The SDK never asks for push permission on its own; call requestPushPermission() when it suits your onboarding. Opting out is setPushEnabled(false) or the OS settings; both are recorded.

Strict semantic versioning. Two major versions are supported at once, with a year to migrate after a major release. Minor releases are monthly; security fixes ship immediately; major releases are announced three months ahead. A deprecated or unsupported SDK logs a warning at start-up and the dashboard shows it under Integrations.

No tracking beyond what you enable, consent surfaces use the platform’s native patterns, and GDPR, CCPA and LGPD data-subject requests cover SDK sessions like any other channel. Attachments are compressed on device, uploaded to signed URLs and virus-scanned before agents see them.