Skip to main content

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.

Key changes from v3 to v4:
  • Chat SDK: pod 'CometChatSDK' (was CometChatPro)
  • Calls SDK: pod 'CometChatCallsSDK' (was CometChatCalls)
  • Import: import CometChatSDK (was import CometChatPro)
  • Import Calls: import CometChatCallsSDK (was import CometChatCalls)
  • Class access: CometChatSDK. (was CometChatPro.)
Upgrading from v3 to v4 is fairly simple. Below are the major changes that are released as a part of CometChat v4. We have renamed our SDK from CometChatPro to CometChatSDK and CometChatCalls to CometChatCallsSDK for Chat and Calls SDK receptively. Note only import name is changed all class name inside the SDKs are same as it is before. There will only be few changes required for v4 migration. Let’s start!

Pod file Changes

Change the SDK name CometChatPro to CometChatSDK for chat SDK and provide it v4’s latest version. Same for calls SDK change it from CometChatCalls to CometChatCallsSDK.
pod 'CometChatSDK', '4.1.0'
pod 'CometChatCallsSDK', '4.2.2'
For the next steps, it recommended to open you iOS project root Folder in VSCode and use it’s global find and replace feature.

Import statement changes

For each and every file in your project that uses CometChat’s chat SDK or calls SDK, the import statement needs to be change

Chat SDK

Changing import statement to CometChatSDK for every file where chat SDK is used. You can do VSCode’s find and replace for the particular statement import CometChatPro to import CometChatSDK .
import CometChatPro ~> import CometChatSDK

Calls SDK

Changing import statement to CometChatCallsSDK for every file where calls SDK is used. You can do VSCode’s find and replace for the particular statement import CometChatCalls to import CometChatCallsSDK .
import CometChatCalls ~> import CometChatCallsSDK

Access class via SDK name changes

In your project there might be cases where you have accessed SDK classes with the SDK name. Like CometChatPro.User or CometChatSDK.Call . Since this import is done using SDK name, you have to replace that as well with the new SDK’s name.
CometChatPro. ~> CometChatSDK.
CometChatCalls. ~> CometChatCallsSDK
For this as well do a find and replace all over the project for exact statement CometChatPro. to CometChatSDK. for chat SDK. And from CometChatCalls. to CometChatCallsSDK. for calls SDK. All Done! now just do pod install, build you project and enjoy all the new features from v4.

Next Steps

Setup SDK

Install and configure the CometChat iOS SDK

Key Concepts

Learn the core concepts behind CometChat v4