AI Integration Quick Reference
AI Integration Quick Reference
Integration
First integrate the Kit — see Getting Started. Then:Step 1: Turn Calling On
The Calls SDK is already part of the Kit’s package; there is nothing to add. Turn calling on when you initialise:- SwiftUI
- UIKit
Info.plist
keys, and how to build without the Calls SDK.
Step 2: Verify the Call Buttons Appear
The Message Header showsCometChatCallButtons once
calling is on — in UIKit by itself; in SwiftUI with hideVoiceCallButton: false and
hideVideoCallButton: false.
Step 3: Install a Call Presenter
A presenter shows every call the Kit starts or answers, in one place:- SwiftUI
- UIKit
How a Call Is Shown
One call is up at a time.
CallCoordinator.shared holds it: outgoing while a placed call
rings, ongoing once it is joined, and activeCall for the call in progress.
Group calls do not ring — every group tap is a meeting the members join from its bubble.
Incoming Calls
The Kit has no in-app incoming-call screen. An incoming call rings on CallKit — the system call screen, locked, in the background or with the app killed — through your app’s VoIP push integration (PushKit and CallKit). The Kit exposes public hooks onCallCoordinator in CometChatCore for it, and joins the call when the user
answers. An app without a push integration shows no incoming calls.
Your push integration calls the Kit at two moments:
CallLifecycleObserver, to register its push tokens and to
report the calls the Kit places to CallKit:
callDidPlace (outgoing calls only), callDidJoin, then exactly
one callDidEnd — also for a call that ended before it was answered. A meeting is never
placed: report it outgoing and connected at its callDidJoin. Keep a presenter installed so
an answered call has a screen when the app comes to the front.
Call Components
Call Buttons
CometChatCallButtons — voice and video buttons for a user or a group, used by the message
header. Learn more about Call Buttons →
Outgoing Call
CometChatOutgoingCall — the ringing screen: the callee, “Calling…” then “Ringing…”, and the
end button; it becomes the call when answered.
Learn more about Outgoing Call →
Ongoing Call
CometChatOngoingCall — the call itself, drawn by the Calls SDK, with the Kit’s connecting and
failure states. Learn more about Ongoing Call →
Call Logs
CometChatCallLogs — the user’s call history, with a call-back button on every row.
Learn more about Call Logs →
Call Log Details
CometChatCallLogDetails — one call’s participants, recordings and history with that user or
group. Learn more about Call Log Details →, or follow
the Call Log Details guide.
Call Events
The Kit emitsoutgoingCall, callAccepted, callRejected and callEnded:
- SwiftUI
- UIKit