Overview
In-call chat creates a group conversation linked to the call session. When participants tap the chat button, they can:- Send and receive text messages
- Share images, files, and media
- See message history from the current call
- Get unread message notifications via badge count
Prerequisites
- CometChat Calls SDK integrated (Setup)
- CometChat Chat SDK integrated (Chat SDK)
- CometChat UI Kit integrated (UI Kit)
The Chat SDK and UI Kit are separate from the Calls SDK. You’ll need to add both dependencies to your project.
Step 1: Add UI Kit Dependency
Add the CometChat UI Kit to your project via Swift Package Manager or CocoaPods: Swift Package Manager:Step 2: Enable Chat Button
Configure session settings to show the chat button:Step 3: Create Chat Group
Create or join a CometChat group using the session ID as the group GUID. This links the chat to the specific call session.Step 4: Handle Chat Button Click
Listen for the chat button click and open your chat view controller:Step 5: Track Unread Messages
Listen for incoming messages and update the badge count on the chat button:Step 6: Create Chat View Controller
Create a chat view controller using UI Kit components:Related Documentation
- UI Kit Overview - CometChat UI Kit components
- Events - Button click events
- Session Settings - Configure chat button visibility