Troubleshooting
Guide to diagnosing and fixing problems when integrating and running the ChatCenterUI SDK.
For every scenario below, enable ChatLoggerConfig(logLevel: .all) — without it the SDK does not output network requests or WebSocket events (logLevel: .off is the default). See Logger settings for details.
Many issues observed in the SDK are caused not by app code but by channel configuration on the server. Before diving into the checklists below, verify the admin workplace settings:
| Symptom in the SDK | What to check in the admin workplace |
|---|---|
| Push notifications do not arrive / arrive only in some environments | iOS channel setup → APNs, Push notification templates |
| Chat shows "out of business hours" / auto-reply | Channel working hours |
| Personal data collection notification, consent, or survey does not arrive | Client notifications, Personal data collection notifications, Client surveys |
| Thread is routed to the wrong agent or bot | Thread segmentation, Routing |
| Notifications are not shown on all clients | Notifications in web chat and mobile apps |
Full overview of the admin workplace — Admin workplace.
SDK does not initialize
Symptoms
- App crashes when creating
ChatCenterUISDK - SDK is created, but methods do not work
Checklist
-
Is the framework linked correctly?
- The
ChatCenterUI.xcframeworkis added inGeneral → Frameworks and Librarieswith Embed & Sign - When using CocoaPods, the project is opened via
.xcworkspace, not.xcodeproj
- The
-
Is
providerUidcorrect?- Value obtained from edna during integration
- No extra whitespace or line breaks
-
Does
ChatTransportConfigcontain valid URLs?// URLs must be full, including the protocol
let transport = ChatTransportConfig(
rest: "https://your-host.edna.io",
webSocket: "wss://your-host.edna.io/socket",
dataStore: "https://your-host.edna.io/files"
)
// Or for cloud clients (without https://):
let transport = ChatTransportConfig(cloudHost: "your-host.edna.io") -
Is the SDK instance retained?
ChatCenterUISDKmust be stored as a property — otherwise ARC will release it as soon as the method returns, and thedelegate,UIApplicationnotification observers, and WebSocket will fall apart
// Wrong — the SDK is released when the method returns
func setup() {
let sdk = ChatCenterUISDK(...)
}
// Correct — the SDK lives for the entire app lifetime
var chatCenterSDK: ChatCenterUISDK?
func setup() {
chatCenterSDK = ChatCenterUISDK(...)
}
Chat does not load
Symptoms
getChat()throws an error- The chat screen shows a loading indicator indefinitely
- A connection error is displayed
Checklist
-
Is the user authorized?
// getChat() throws ChatCenterUIError.userNotAuthorized if you forget:
chatCenterSDK.authorize(user: ChatUser(identifier: "user_id")) -
Is the server reachable?
- Open the REST URL in a browser — expected response is HTTP 200 or 401/403 (auth required); 5xx or a timeout means the server is unreachable
- Verify that the device or simulator has network access
- When using a VPN, make sure traffic is routed correctly
-
Is the SSL certificate valid?
- For test servers with a self-signed certificate:
var networkConfig = ChatNetworkConfig()
networkConfig.sslPinning.allowUntrustedSSLCertificate = true // for testing only!
let chatConfig = ChatConfig(transportConfig: transport, networkConfig: networkConfig) - For production, use
sslPinning.trustedCertificateswith backup certificates
- For test servers with a self-signed certificate:
-
Does the API version match the server? The default
.api17works with ChatCenter 6.x and later. The exact value for your server is in the API versions table.
Messages are not sent
Symptoms
- A message shows the
Not deliveredstatus send(message:)throws an error- Messages disappear
Checklist
-
What error is thrown? Catch the specific
ChatCenterUISendMessageErrorcase and match it to the cause — the case table and a handling example are in the Error reference. The most common case when sending programmatically is.webSocketNotActive(chat is closed, WebSocket is disconnected). -
Is the WebSocket connection active?
- When sending from the background: set
chatConfig.keepSocketActive = trueandchatConfig.shouldUseRemoteConfig = false(otherwise the server config will override the local value). See the warning in SDK settings. - Check that the device has network connectivity.
- When sending from the background: set
-
Does the attachment size exceed the limit? For images, the SDK checks the size before sending and throws
ChatCenterUISendMessageError.messageImageTooLargeif the limit is exceeded. The default limit is 30 MB; the server can override it. To get the exact value for your tenant, contact edna support. -
send(message:)does not throw, but the message was not delivered? The method only confirms delivery to the WebSocket, not to the server. REST failures (history and file uploads) are reported separately via thedidReceiveNetwork(error:)delegate; WebSocket disconnects are not reported to the delegate (see SDK delegate).
Push notifications do not arrive
Symptoms
- The device does not receive push notifications from ChatCenter
- A push arrives, but the chat does not open
Checklist
-
Was the device token passed via
ChatCenterUISDK.setDeviceToken(_:)? Full call example is in the Notifications section. -
Were notification permissions requested via
UNUserNotificationCenter.requestAuthorization? Without this, APNs will not issue a token. -
Are push notifications configured on the edna server? The APNs key (.p8) or certificate (.p12), Bundle ID, and environment type (sandbox/production) are set in the admin workplace — see iOS mobile chat setup → Push notification configuration. The APNs payload template (the
apsfields and placeholders) is in Push notification templates. If you do not have access to the admin workplace, contact support@edna.io. -
Is the notification from ChatCenter and not from your app?
if let userInfo = userInfo as? [String: Any],
ChatCenterUISDK.isChatCenterNotification(userInfo) {
// This is a notification from the ChatCenterUI SDK
} -
Is notification handling implemented? Both methods are declared as
throws(ChatCenterUIError)— make sure to usetry:- Chat is open →
try chatCenterSDK.handleNotification(userInfo: userInfo)(the context is not injected into an already-open chat — see Notifications) - Chat is closed →
try chatCenterSDK.getChat(userInfo: userInfo)+ present the view controller
- Chat is open →
See the Notifications section for details.
Theme / customization issues
Symptoms
- Styles are applied with a delay (the default theme is visible on the first frame)
- The light theme works, but the dark one does not
- The font in message bubbles does not change
Checklist
- Is the theme set before
getChat()? The theme is read when the chat is opened. - Is the assignment order of
themeanddarkThemecorrect? AssignchatCenterSDK.darkThemeafterchatCenterSDK.theme. AssigningthemeresetsdarkTheme— if you set the dark theme first, the light theme will overwrite it. - The font in bubbles is
typography.message, nottypography.body(see the token map in Typography).
A detailed design-system FAQ is in Design system troubleshooting.
Slow chat loading
Symptoms
- In the SDK logs (
logLevel: .all), the REST history request (api/client/history, orhistoryfor servers withnewRoutesEnabled: false) takes more than 1–2 seconds - The delay is reproducible in the demo app on the same server data
Checklist
- Check the network latency to the server. Enable
ChatLoggerConfig(logLevel: .all)and compare the time of the REST history request (api/client/historyorhistory) against the typical latency to the server. - History page size on scroll-up. With
shouldUseRemoteConfig = false, reducechatConfig.historyLoadingCount(default —30). WithshouldUseRemoteConfig = truethe value is set by the server — configure it via edna support. - Do not recreate
ChatThemebefore every chat opening — store it as a property and reuse it.
Diagnosing with the demo app
- Reproduce the problem in the demo app using your server data.
- If it reproduces, the cause is in the SDK or on the server; send an isolated project to support@edna.io. Before sending, replace the real
providerUidand server URLs with placeholders (see Reporting an issue). - If the demo app does not reproduce the problem, the cause is in your project settings or the way the SDK is integrated.
Related sections
- Error reference — all SDK error types
- Logger settings — enabling logging
- Reporting an issue — how to prepare a report
- Demo app — isolating problems
- Design system troubleshooting — theme and styling issues
- Admin workplace — server-side channel, push, routing, and notification settings