Documentation Index
Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Faster Integration with UI KitsIf you’re using CometChat UI Kits, voice and video calling can be quickly integrated:
- Incoming & outgoing call screens
- Call buttons with one-tap calling
- Call logs with history
Add the CometChat Dependency
Using CocoaPods
Add the CometChat Calls SDK to yourPodfile:
Using Swift Package Manager
- In Xcode, go to File > Add Package Dependencies
- Enter the repository URL:
https://github.com/cometchat/cometchat-calls-sdk-ios - Select the version and add to your target
Add Permissions
Add the required permissions to yourInfo.plist:
iOS requires you to provide a description for why your app needs camera and microphone access. These descriptions are shown to users when requesting permissions.
Enable Background Modes
For calls to continue when the app is in the background, enable the following background modes in your project’s Signing & Capabilities:- Select your target in Xcode
- Go to Signing & Capabilities
- Click + Capability and add Background Modes
- Enable:
- Audio, AirPlay, and Picture in Picture
- Voice over IP (if using VoIP push notifications)
Initialize CometChat Calls
Theinit() method initializes the SDK with your app credentials. Call this method once when your application starts, typically in your AppDelegate or app entry point.
CallAppSettings
TheCallAppSettings class configures the SDK initialization:
| Parameter | Type | Required | Description |
|---|---|---|---|
appId | String | Yes | Your CometChat App ID |
region | String | Yes | Your app region (us or eu) |
- Swift
- Objective-C
| Parameter | Description |
|---|---|
callsAppSettings | Configuration object with App ID and Region |
onSuccess | Closure called on successful initialization |
onError | Closure called if initialization fails |