The delegate allows the reception of event callbacks from the SDK. Ensure that the delegate object isn’t nil. Here's an example:
Invoked when the Messenger is displayed. Examples include:
calls
showMessengercalls
openChatWhen the user opens messenger through Channel button
Invoked when the messenger is hidden. Examples include:
A call to hideMessenger
A call to sleep
A call to shutdown
When the user explicitly closes the messenger, such as by clicking the X button.
Invoked when the SDK finishes creating a new chat. Examples are the following:
Explicitly creating a chat by the user, such as by clicking a new Chat button.
calls
openChatwithchatId = nil
You shoud use onBadgeChanged(unread: Int, alert: Int).
Invoked when the count of the user’s badge is changed. Examples include:
bootWhen the user receives messages or marketing messages
Invoked when the number of notifications changes or at boot. The details of this method's parameters, unread, and alert are as follows:
unread : The number of all unread notifications the user has. It includes the number of
alert. It is displayed as a red dot on the Channel button.alert : The number of important notifications that the user has not read. It is displayed as a number on the Channel button.
This callback is invoked when the user changes Follow-up information. ChannelIO.updateUser does not trigger it. Values in dictionaries are nullable.
Invoked when the user clicks a link in the chat or clicks the link button.
If this method returns true, URL redirection performed by the SDK will not work.
Invoked when receiving In-app message popup. Examples include:
Receiving a message from the manager
Receiving a marketing message
Refer to the CHTPopupData documentation for details on the events that are parameters of this function.