Skip to main content
FieldValue
PlatformiOS UI Kit
Common IssuesInitialization, theming, real-time updates, permissions
Key ChecksSDK initialization, user login, CometChatUIKit.init() order
PermissionsCamera, microphone (Info.plist)
DebugCheck SDK connection status, verify dashboard settings
This guide covers common issues and solutions when working with the CometChat iOS UI Kit.

CocoaPods Issues

IssueSolution
”Could not find compatible versions”Run pod install --repo-update to refresh spec repos
Pod version not foundVerify the version exists on CocoaPods
Repo clone failuresClean repos with commands below, then retry
Build errors after pod installOpen .xcworkspace file, not .xcodeproj

Clean and Retry

rm -rf Pods Podfile.lock
pod cache clean --all
pod install --repo-update

Reset CocoaPods Completely

If repo errors persist:
rm -rf ~/.cocoapods/repos
pod setup
pod install --repo-update

Fallback to Swift Package Manager

If CocoaPods continues to fail, use SPM instead:
  1. Remove Podfile and Pods folder
  2. Open your .xcodeproj in Xcode
  3. Go to File → Add Package Dependencies
  4. Add https://github.com/cometchat/cometchat-uikit-ios with version 5.1.9
  5. Add https://github.com/cometchat/chat-sdk-ios with version 4.1.0

Initialization Issues

IssueSolution
SDK not initializedCall CometChat.init() before any UI Kit operations
User not logged inEnsure CometChat.login() completes successfully before showing UI
UIKit not initializedCall CometChatUIKit.init() after SDK init and before using components
Credentials invalidVerify App ID, Auth Key, and Region in CometChat Dashboard

Theming & Styling

IssueSolution
Colors not applyingApply theme before CometChatUIKit.init()
Dark mode not workingUse UIColor { traitCollection in } for dynamic colors
Inconsistent colorsSet all related colors (text, background, border) together
Styles not applyingApply global styles before CometChatUIKit.init()
Instance style overriddenInstance styles take precedence over global styles
Font not loadingVerify font name is correct and font is added to project

Conversations

IssueSolution
Empty conversation listEnsure user is logged in and has existing conversations
Conversations not updatingCheck SDK connection and real-time listeners
Navigation not workingVerify navigationController is not nil; embed in UINavigationController
Custom views not appearingEnsure custom view has proper constraints and non-zero frame
Typing indicator not showingVerify disableTyping is not set to true

Users

IssueSolution
Empty user listEnsure SDK is initialized and user is logged in
Users not updating in real-timeCheck SDK connection and presence listeners
Search not workingVerify hideSearch is not set to true
Status not showingCheck that hideUserStatus is not set to true
Custom views not appearingEnsure custom view has proper constraints

Groups

IssueSolution
Empty group listEnsure SDK is initialized and user is logged in
Groups not updating in real-timeCheck SDK connection and group listeners
Search not workingVerify hideSearch is not set to true
Group type icons not showingCheck that hideGroupType is not set to true
Custom views not appearingEnsure custom view has proper constraints

Group Members

IssueSolution
Empty member listEnsure group object is valid and has members
Management options not showingCheck logged-in user’s permissions (must be admin/owner)
Search not workingVerify hideSearch is not set to true
Status not showingCheck that hideUserStatus is not set to true
Custom views not appearingEnsure custom view has proper constraints

Message Header

IssueSolution
Header not showing user infoEnsure user or group is set on the header
Status not updatingCheck SDK connection and user presence listeners
Back button not workingVerify onBack callback is set and hideBackButton is false
Typing indicator not showingEnsure typing events are enabled in SDK
Call buttons not appearingCheck that hideVideoCallButton and hideVoiceCallButton are false

Message List

IssueSolution
Messages not loadingEnsure user/group is set and SDK is initialized
Real-time updates not workingCheck SDK connection status and listeners
Reactions not showingVerify reactions are enabled in dashboard
Thread replies not workingEnsure hideReplyInThreadOption is not set to true
Custom views not appearingEnsure custom view has proper constraints and non-zero frame
Scroll position issuesCheck scrollToBottomOnNewMessages setting

Message Composer

IssueSolution
Send button not workingEnsure user or group is set on the composer
Attachments not showingCheck that attachment options are not hidden
Voice recording not workingVerify microphone permissions are granted in Info.plist
Mentions not workingEnsure disableMentions is not set to true
Typing indicators not sentCheck that disableTypingEvents is not set to true

Calling

IssueSolution
Call buttons not showingVerify CometChatCallsSDK is in Podfile and run pod install
”Permission denied” errorAdd camera/microphone permissions to Info.plist
Calls not connectingCheck network connection and CometChat credentials
No incoming call UIEnsure CometChatCallsSDK is initialized before login
Audio not workingCheck device is not on silent mode

AI Features

IssueSolution
AI features not appearingEnable them in CometChat Dashboard → AI
Conversation starters not showingOnly appear for new conversations with no messages
Smart replies not appearingEnsure feature is enabled and messages exist
Summary not generatingNeed sufficient messages in conversation
AI Assistant emptyVerify user has AI chat history
Only loading indicator showsSet user or group property
Styling not appliedApply style before presenting view
Callbacks not firingSet callbacks before pushing to navigation
AI not respondingVerify AI features are enabled in dashboard
Streaming not workingCheck network connectivity
Agent not detectedVerify user has isAgentic property set to true

Events

IssueSolution
Events not firingVerify listener is added before the action occurs
Duplicate eventsCheck you’re not adding the same listener multiple times
Memory leaksEnsure removeListener is called in viewWillDisappear
UI not updatingDispatch UI updates to main thread with DispatchQueue.main.async
Listener ID conflictsUse unique, descriptive IDs for each listener

Permissions (Info.plist)

Add these keys to your Info.plist for full functionality:
<!-- Camera access for video calls and image capture -->
<key>NSCameraUsageDescription</key>
<string>Camera access is required for video calls and capturing photos</string>

<!-- Microphone access for voice/video calls and audio messages -->
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access is required for voice calls and audio messages</string>

<!-- Photo library access for sending images -->
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo library access is required to send images</string>

Debug Checklist

When troubleshooting issues, verify the following:
  1. SDK Initialization
    • CometChat.init() called with correct App ID and Region
    • CometChatUIKit.init() called after SDK init
  2. User Authentication
    • User is logged in via CometChat.login()
    • Auth token is valid and not expired
  3. Dashboard Settings
    • Features are enabled (AI, Reactions, etc.)
    • API keys have correct permissions
  4. Network
    • Device has internet connectivity
    • WebSocket connection is established
  5. Permissions
    • Required permissions added to Info.plist
    • User has granted permissions at runtime

Getting Help

Sample App

Complete implementation example

UIKit Source

CometChat UIKit iOS repository

Error Guide

Complete list of error codes

Support

Contact CometChat support