Use this file to discover all available pages before exploring further.
AI Integration Quick Reference
// Get current status: "connecting" | "connected" | "disconnected"let status = CometChat.getConnectionStatus?.value// Listen for connection changes// Conform to CometChatConnectionDelegateCometChat.addConnectionListener("LISTENER_ID", self as CometChatConnectionDelegate)func connecting() { print("Connecting...") }func connected() { print("Connected") }func disconnected() { print("Disconnected") }// CleanupCometChat.removeConnectionListener("LISTENER_ID")
The CometChat SDK maintains a WebSocket connection to CometChat servers for real-time events. You can check the current connection state and listen for changes, useful for showing connectivity indicators in your UI or queuing operations while offline.When the connection drops, the SDK automatically attempts to reconnect, cycling through disconnected -> connecting -> connected.
Register a CometChatConnectionDelegate to receive real-time connection state updates. We recommend adding this in your AppDelegate and in your app’s first view controller after login.