Skip to main content
Version: 5.9.0

Introduction

Where to start

Minimal SDK integration path: InstallationQuick startAuthorizationDisplaying the chatNotifications.

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.

Documentation for administrators

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:

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.

Not everything in the UI is customizable

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).
  • ChatTheme and ChatComponents — 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

  1. Initialization — create ChatTransportConfig, ChatConfig, and a ChatCenterUISDK instance, passing providerUid, chatConfig, and loggerConfig if needed.
  2. Themes and locale setup — apply ChatTheme, darkTheme, localizationConfig.
  3. User authorization — call authorize(user:auth:) when stable client identification is available in the app.
  4. Open the chat — get the controller via getChat() (the method throws ChatCenterUIError) and embed it into navigation (push/present). To open the chat from a push tap, pass the push userInfo to getChat(userInfo:).
  5. Notification handling — pass the device token via the static ChatCenterUISDK.setDeviceToken(_:) method. To distinguish SDK push notifications from your own, use ChatCenterUISDK.isChatCenterNotification(_:).
  6. Session terminationlogout() ends the session on the server (the user stops receiving push notifications; the method throws ChatCenterUIError.userNotAuthorized if 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

TaskMethod / classSection
Initialize the SDKChatCenterUISDK(providerUid:chatConfig:)Initialization
Authorize a userauthorize(user:auth:)User management
Open the chatgetChat()pushViewControllerDisplaying the chat
Send a message programmaticallysend(message: .text("..."))Messages
Prefill the input fieldprefill(message:)User management
Get the unread countergetUnreadMessagesCount(completion:)Messages
Subscribe to SDK eventsdelegate = selfSDK delegate
Configure push notificationssetDeviceToken(_:)Notifications
Handle a pushhandleNotification(userInfo:)Notifications
Customize appearancetheme = ChatTheme(...)Design system
Change the UI languagelocalizationConfig = ...Localization
Enable loggingChatLoggerConfig(logLevel: .all)Logging
Log out (with push unsubscribe)logout()User management
Log out (locally only)deauthorizeUser()User management
Get the SDK versionChatCenterUISDK.versionSDK initialization

Documentation map

SectionDescription
InstallationInstall via CocoaPods, SPM, or manually
Quick startMinimal integration from initialization to opening the chat
Initialization and setupChatCenterUISDK, ChatConfig, ChatTransportConfig
Displaying the chatPush / present, opening from a push, navigation
NotificationsAPNs, device token, push handling
LifecycleFull integration flow and SDK states
SwiftUIEmbedding the chat in a SwiftUI app
User managementChatUser, ChatAuth, authorize, logout
MessagesSending, prefill, unread counter
SDK delegateChatCenterUISDKDelegate, events and errors
Design systemThemes, tokens, components, flows
LocalizationChatLocalizationConfig, string overrides
LoggingChatLoggerConfig, log levels
Error handlingChatCenterUIError and network errors
TroubleshootingSymptoms, checklists, common errors