CometChatCallButtons shows a voice and a video button for a user or a group. A tap
starts the call: a 1:1 call that rings the other user, or a group meeting by sending a
meeting message to the group. The message header uses it for its call region.

Where It Fits
CometChatCallButtons is the call entry point for a conversation. Give it a user or a group
and it starts the call; the Kit presents the call on its own call screens, or hands the call
to you to show yourself.
Quick Start
With calling on, the buttons place the call and show it themselves.- SwiftUI
- UIKit
.cometChatCallPresenter()’s when your app installs it at its root, otherwise
the buttons’ own full-screen cover.- A user — the Kit places a 1:1 call and shows it ringing on
CometChatOutgoingCall; when the callee answers, that screen becomes the call. - A group — the Kit sends a
meetingcustom message and joins that meeting onCometChatOngoingCall. Group calls do not ring.
Actions and Events
Callback Methods
Showing the Call Yourself
onCallInitiated and onStartDirectCall replace the Kit’s screens. You get the placed
Call, or the meeting message, and show it yourself.
- SwiftUI
- UIKit
The buttons render only when something can show the call: the Kit built with the Calls SDK
and calling turned on (
CometChatSession.initialize(…, enableCalling: true)), or a click
handler, onCallInitiated or onStartDirectCall set.Taking the Tap Yourself
A click handler replaces the call entirely — the Kit starts nothing.- SwiftUI
- UIKit
Errors
A failure goes toonError. With no user or group the error is INVALID_RECEIVER.
After a failure the buttons stay in the error state until the next call succeeds, and a
second tap while a call is starting starts another.
- SwiftUI
- UIKit
onError has the signature (CometChatError) -> Void.Global Events
A 1:1 call also emits an outgoing-call event.- SwiftUI
- UIKit
The Kit emits
outgoingCall on CometChatEvents.Functionality
- SwiftUI
- UIKit
Advanced Methods
Store Access
CallButtonsStore is the part that starts calls.
- SwiftUI
- UIKit
Pass one to
store to observe its state — idle, initiating or error — or to share it.Delegate
- SwiftUI
- UIKit
CometChatCallButtons is a View struct and has no delegate. Use its callbacks.Subclassing
- SwiftUI
- UIKit
CometChatCallButtons is a View struct. Customise it with its parameters and style.Style
- SwiftUI
- UIKit
CometChatCallButtonsStyle holds one CallButtonStyle per button and the gap between
them. Set only what you change:Next Steps
Outgoing Call
The ringing screen a 1:1 call opens
Ongoing Call
The screen a group meeting opens
Call Features
Set up calling in your app
Message Header
The header that embeds the call buttons