Introduction
Minimal SDK integration path: Installation → Quick start → Authorization → Displaying the chat → Notifications.
Before you start, request the providerUid and the server addresses (REST / WebSocket / DataStore or cloudHost) from your edna Chat Center administrator — they are available on the "Installation" tab of the iOS channel (details). Without them, SDK initialization is not possible. If you do not have access to the admin panel, write to edna support.
About the product
The edna Chat Center SDK is a tool for embedding a chat with edna Chat Center agents into an iOS application. Messages sent and received through the chat are available to agents in the edna Chat Center workspace.
Some SDK parameters (providerUid, REST/WebSocket/DataStore domains, APNs keys, push notification templates, channel operating mode, surveys, routing) are configured in the edna Chat Center workspace, not in code. If a parameter is missing from this documentation or behaves unexpectedly, check the administrator documentation:
- Connecting the iOS mobile chat — channel setup, APNs (.p8/.p12),
providerUid, server URLs - Push notification templates —
apspayload format and available placeholders - Administrator workspace — overview — full list of admin panel sections
How the chat works
The chat opens via a button that you configure on your side. The SDK requires explicit authorization — each client is identified by a unique immutable identifier (parameter of the ChatUser constructor), thanks to which conversation history is preserved across sessions.
During authorization, you can pass additional client attributes via the data parameter of the ChatUser constructor — a [String: String] dictionary (for example, full name, email, segment, city). The attributes are displayed in the client card in the edna Chat Center workspace. If client data becomes available later, update it via the updateData(data:) method. See User management for details.
Chat customization
The chat is customized through the SDK design system: colors, typography, images, component styles, and flow scenarios. You can configure the color scheme, fonts, icons, button appearance and text, background, quick reply behavior, and other parameters — but only within the documented surface. The full list of customizable elements and tokens is available in the Design system section.
The SDK provides a fixed set of tokens and styles; elements outside this set (for example, individual system icons, sizes of some service screens) cannot be customized. Some public API parameters in the current version are not applied or only work under certain conditions — see Known limitations. Before planning visual changes, make sure the required parameters are present in the design system and are not marked as a limitation.
Architecture and key components
ChatCenterUISDK— SDK facade through which all operations are performed: authorization, opening the chat, sending messages, handling push notifications.ChatCenterUISDKDelegate— protocol for handling SDK events (unread counter changes, network errors, link handling, logging).ChatConfig— business settings model (chat features, search, voice messages, socket behavior).ChatTransportConfig/ChatNetworkConfig— connection parameters (REST, WebSocket, datastore, SSL pinning).ChatThemeandChatComponents— design system: colors, typography, images, and screen-specific styles.ChatLoggerConfig,ChatLocalizationConfig— helper models for logging and localization.
Full class descriptions are available in the API reference at docs-sdk.edna.io/ios-docs/index.html.
Integration lifecycle
- Initialization — create
ChatTransportConfig,ChatConfig, and aChatCenterUISDKinstance, passingproviderUid,chatConfig, andloggerConfigif needed. - Themes and locale setup — apply
ChatTheme,darkTheme,localizationConfig. - User authorization — call
authorize(user:auth:)when stable client identification is available in the app. - Open the chat — get the controller via
getChat()(the method throwsChatCenterUIError) and embed it into navigation (push/present). To open the chat from a push tap, pass the pushuserInfotogetChat(userInfo:). - Notification handling — pass the device token via the static
ChatCenterUISDK.setDeviceToken(_:)method. To distinguish SDK push notifications from your own, useChatCenterUISDK.isChatCenterNotification(_:). - Session termination —
logout()ends the session on the server (the user stops receiving push notifications; the method throwsChatCenterUIError.userNotAuthorizedif the user is not authorized);deauthorizeUser()clears only local state without a server logout.
See Installation, Initialization, Displaying the chat, and Notifications for details.
Quick lookup: what I want to do
| Task | Method / class | Section |
|---|---|---|
| Initialize the SDK | ChatCenterUISDK(providerUid:chatConfig:) | Initialization |
| Authorize a user | authorize(user:auth:) | User management |
| Open the chat | getChat() → pushViewController | Displaying the chat |
| Send a message programmatically | send(message: .text("...")) | Messages |
| Prefill the input field | prefill(message:) | User management |
| Get the unread counter | getUnreadMessagesCount(completion:) | Messages |
| Subscribe to SDK events | delegate = self | SDK delegate |
| Configure push notifications | setDeviceToken(_:) | Notifications |
| Handle a push | handleNotification(userInfo:) | Notifications |
| Customize appearance | theme = ChatTheme(...) | Design system |
| Change the UI language | localizationConfig = ... | Localization |
| Enable logging | ChatLoggerConfig(logLevel: .all) | Logging |
| Log out (with push unsubscribe) | logout() | User management |
| Log out (locally only) | deauthorizeUser() | User management |
| Get the SDK version | ChatCenterUISDK.version | SDK initialization |
Documentation map
| Section | Description |
|---|---|
| Installation | Install via CocoaPods, SPM, or manually |
| Quick start | Minimal integration from initialization to opening the chat |
| Initialization and setup | ChatCenterUISDK, ChatConfig, ChatTransportConfig |
| Displaying the chat | Push / present, opening from a push, navigation |
| Notifications | APNs, device token, push handling |
| Lifecycle | Full integration flow and SDK states |
| SwiftUI | Embedding the chat in a SwiftUI app |
| User management | ChatUser, ChatAuth, authorize, logout |
| Messages | Sending, prefill, unread counter |
| SDK delegate | ChatCenterUISDKDelegate, events and errors |
| Design system | Themes, tokens, components, flows |
| Localization | ChatLocalizationConfig, string overrides |
| Logging | ChatLoggerConfig, log levels |
| Error handling | ChatCenterUIError and network errors |
| Troubleshooting | Symptoms, checklists, common errors |