Integrate the Chat SDK
Step 1: Add the following to your POD
file.
Step 2: Now, enable all the below mentioned capabilities into your project.
Capabilities |
---|
App Groups |
Background Modes |
Now, go to the background mode and enable the below given modes
Background Modes |
---|
Audio,Airplay, and Picture in Picture |
Background fetch |
Remote notifications |
#
Configure the SDK server & DataNow, configure the server details in SDK and access the data globally using the AppDelegate class.
Step 7:Download and extract the iOS supporing files and move into iOS project under Runner directory.
- Commons
- FlyEvents
- FlySdkMethodCalls
- JsonSerializer
- FlyBaseController
#
Initialize ChatSDKTo start using the sdk, there are a few basic pieces of data that must be made available for the SDKs to function perfectly.
Thus, we utilize the usage of the ChatSDK
builder class making the data available for SDKs. Furthermore, in your project you must use the AppDelegate
class within the didFinishLaunchingWithOptions
method and also provide required data to build the ChatSDK Builder. Let's have a look at the example given below.
#
Chat Builder Function DescriptionFunction | Parameter Type | Description |
---|---|---|
setAppGroupContainerID | String | Pass group container id of the project that stores UserDefaults and Database |
setLicenseKey | String | Used to proceed with Registration |
isTrialLicense | Bool | If the obtained license key is a trial license key - display the message as true else false |
setDomainBaseUrl | String | Url required to make API calls |
buildAndInitialize | n/a | Initialize the chat configuration |
caution
The base url must have Http/Https protocol which should be closed with a slash (/)
, or else will display an exception bug message
.