Not able to capture ZendeskEvent unreadMessageCountChanged | Community
Skip to main content

Not able to capture ZendeskEvent unreadMessageCountChanged

  • April 29, 2022
  • 1 reply
  • 0 views

I have follow the advanced integration instructions for iOS (https://developer.zendesk.com/documentation/zendesk-web-widget-sdks/sdks/ios/advanced_integration/ ) to observe ZendeskEvent unreadMessageCountChanged but it does not work. 

When I put some breakpoints, manually get unread message count and have the correct updated count. 

Zendesk.instance?.messaging?.getUnreadMessageCount()

But there is no emitted events that trigger for below code

Zendesk.instance?.addEventObserver(self) { event in

            switch event {

            case .unreadMessageCountChanged(let unreadCount):

                print("unread message count: \(unreadCount)")

            case .authenticationFailed(let error as NSError):

                print("Authentication error received: \(error)")

                print("Domain: \(error.domain)")

                print("Error code: \(error.code)")

                print("Localized Description: \(error.localizedDescription)")

            @unknown default:

                break

            }

        }

@Zendesk Devs, Is methodology of observation something related to Push Notification or not? Since I also have issue with Push Notifications 

1 reply

Tipene
  • May 6, 2022
Hi Huy,
 
So we can look at this in a bit more detail, I'm going to pull this in to a ticket. 
 
You should see an email come through from me shortly!
 
Tipene