Podfile
by running the following command.
CometChatSDK
framework through CocoaPods.
CometChatSDK
by command
https://github.com/cometchat/chat-sdk-ios.git
and set dependency rule to Up to Next Major Version
and set version as 4.0.62
. Then click on the Add Package button.CometChatSDK
must be checked in the Package Product column and click on the Add Package button. This will add Package Dependencies menu in Xcode.Info.plist
file to tell the user why your app needs access to the user’s photo library, Camera, Microphone. Then, App prompts the user to grant permission for access, the alert displays the justification string you provided, in the language of the locale selected on the user’s device. You can do this as follows:
CometChatSDK
framework build on Swift, you have to ensure the required libraries are embedded. This can be done by setting the “Always Embed Swift Standard Libraries”
checkbox in your target’s build settings to “Yes”:
Header Search Paths
to $SDKROOT/usr/include/libxml2
.
init()
method initializes the settings required for CometChat.
The init()
method takes the below parameters:
setRegion()
method.AppSettings
class allows you to configure three settings:
didFinishLaunchingWithOptions:
method of the AppDelegate
class.
appId
with your CometChat App ID in the above code.
Parameter | Description |
---|---|
appID | CometChat App ID |
appSetting | An object of the AppSettings class. |