This guide walks you through installing the CometChat Calls SDK and initializing it in your iOS application.Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-docs-v6-beta2-flutter-uikit.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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 |