React Native SDK
The floating launcher and support chat in a React Native app with the native SDK, no WebView.
The web embeds are script tags that render into a page. A mobile app has no
page, so it uses @clientsphere/support-native instead. The package covers
both embeds:
- The floating launcher: a pill that opens an Intercom-style sheet with the knowledge base, a "send us a message" form that becomes a ticket, and a suggestion form. Configured under Customer Support → Floating Launcher. Most apps want this one.
- Support chat: a live conversation with agents and the AI assistant, the mobile counterpart of the Support Hub. Configured under Customer Support → Support Hub. The rest of this page and the hooks, chat screen and lifecycle pages describe it.
It talks to your workspace directly. There is nothing to configure server-side beyond the widget you already have, and a visitor who chats on your site and in your app is one contact in the CRM as long as you identify them by email in both places.
Install
react and react-native are peer dependencies. To keep the visitor id across
launches, also install a storage library such as
@react-native-async-storage/async-storage; the SDK accepts anything with
getItem and setItem.
Find the widget id under Customer Support → Support Hub. It is the same id the web embed uses.
Minimal app
That is a working support chat. The provider fetches the widget config, opens a session, connects the socket, keeps a heartbeat going, and rebuilds all of it when the app returns from the background. The screen shows history, sends messages, streams AI replies, shows agent typing, offers "Talk to a human", and handles the email gate when the widget requires one.
Pass storage. Without it the visitor id lives in memory and every launch
starts a new visitor, which means no conversation history.
What is in the package
| Layer | Exports | Depends on |
|---|---|---|
| Core | SupportClient, SupportRealtime, LauncherClient, StorageAdapter, types | socket.io-client for chat only |
| React | SupportProvider and its hooks; LauncherProvider, useLauncher | react, react-native |
| UI | SupportChatScreen, SupportLauncher | the React layer |
Use the screen as is, build your own on the hooks, or use the core client without React at all.
Pages
Floating launcher
The pill and sheet: knowledge base, send a message, suggest an improvement.
Identity and sessions
Who the visitor is, the email gate, and what is persisted between launches.
Hooks
useConversation, useConversations and useSupportConfig, field by field.
Chat screen
SupportChatScreen props, attachments, and building your own.
Lifecycle and limits
Background and foreground, reconnects, errors, rate limits, and what the SDK does not do.