Add the CometChat SDK to your app:
Drag the MessageSDKFramework.framework
and MessageSDKFramework.bundle
into your Xcode project folder target.
Make sure the “Copy items to destination’s group folder” checkbox is checked.
Add Dependencies:
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 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. -all_load
2. -ObjC
Include the class <MessageSDKFramework/MessageSDK.h> in the .h file of your class.
All the method calls will invoke their respective callback blocks as defined below.
Initialize MessageSDK object
MessageSDK *msgSDK = [[MessageSDK alloc] init];