Kindly register for remote notification by conforming to the following delegates in the AppDelegate
Call the below methods when an APNS token gets updated.
To receive messages in the background or in the killed state, You need to enable app group container ID. And pass in below
In order to access data between app and notification extension, enabling app group is mandatory to access user defaults and database in container.
|CONTAINER_ID||Create App groups and assign the obtained group container id. SDK uses this string to create the path for the local storage.|
In order your changing existing app group container may occur data loss.
Need to set
Thus, we utilize the usage of the
ChatSDK builder class making the data available to access user defaults and database in container for
Re-initialize the ChatSDK builder in
didReceive method of the
In class that extends the
UNNotificationServiceExtension after validating whether the received payload is for Chat or not, call the below method
to process the request further.
|NOTIFICATION_CONTENT||Notification request content|
|setAppGroupContainerID||Pass group container id of the project that stores UserDefaults and Database|