Environment Setup

Add the CometChat SDK to your app:

Drag the cometchat.framework , cometchat.bundle , cometchat-ui.framework and cometchat-ui.bundle into your Xcode project folder target.
Make sure the “Copy items to destination’s group folder” checkbox is checked.

Add Dependencies Using CocoaPods:

If you are using cocoa pods in your project then you need to add the following lines in your pod file:

pod 'MessageSDKFramework' 
pod 'cometchat-ui' 

If you want add specific version to you project then you need to add the following lines in your pod file :

pod 'MessageSDKFramework', '~> version number' 
pod 'cometchat-ui', '~> version number' 

For Example : pod 'MessageSDKFramework', '~> 7.0' 
              pod 'cometchat-ui', '~> 7.0' 

NOTE: If you want to know about CocoaPods usage and installation you can refer to link below

https://guides.cocoapods.org/using/using-cocoapods

Add Dependencies Manually:

Click on Targets → Your app name → and then the ‘Build Phases’ tab.
Expand ‘Link Binary With Libraries’ as given below and add the following frameworks.
1. SystemConfigurarion.framework
2. MobileCoreServices.framework
3. CoreGraphics.framework
4. CFNetwork.framework
5. libxml2.tbd
6. libz.tbd
7. libsqlite3.tbd


Add Firebase Frameworks:

If you are using cocoa pods in your project then you need to add the following lines in your pod file:

pod ‘Firebase/Auth’
pod ‘Firebase/Database’

If you are not using Cocoa pods then you need to download the Firebase from the below URL:

https://firebase.google.com/docs/ios/setup#frameworks

Now unzip the FireBase.zip file and add the Frameworks present in “Analytics”, “Database”and “Auth” Folders along with Firebase.h file to your Xcode Project.

Add Linker Flag:

Click on Targets → Your app name → and then the ‘Build Settings’ tab.
Scroll down to the ‘Linking’ section, and double-click to the right of where it says ‘Other Linker Flags’. Click on the “+” button to add the following:
1. -ObjC

  • Was this helpful?
  • Yes   No