AI Integration Quick Reference
AI Integration Quick Reference
disconnected -> connecting -> connected.
Connection States
Get Current Status
UsegetConnectionStatus to check the current connection state at any time:
- Swift
Listen for Connection Changes
Register aCometChatConnectionDelegate to receive real-time connection state updates. We recommend adding this in your AppDelegate and in your app’s first view controller after login.
- Swift
- Objective C
Offline support
With offline support enabled (SDK 4.2.0 or later), your app keeps working without a connection. Cached chats are shown instantly, and messages you send with theonMessagePending overloads are queued and delivered automatically on reconnect. See Show Cached Data and Send While Offline.
Next Steps
WebSocket Management
Manage WebSocket connection behavior
Setup SDK
Install and initialize the CometChat SDK
Authentication
Authenticate users with the CometChat SDK
Overview
Overview of the CometChat iOS SDK