Upgrading from 2.8.0 to 2.9.0

The Helpshift plugin v2.9.0 is a major update. Please note that we have deprecated some APIs. If you have questions or feedback, please Contact Us

List of deprecated APIs

Deprecated API New API
HelpshiftCampaigns.GetCountOfUnreadMessages() HelpshiftCampaigns.RequestUnreadMessagesCount()

Show count of unread campaign messages

On plugin version 2.8.0 or below, unread campaigns messages count can be obtained synchronously and could result in a deadlock. This is changed in plugin version 2.9.0 and unread message count is always obtained asynchronously.

As an example, if you want to show the unread campaigns messages in one of the view controllers and you're on plugin 2.8.0 or earlier versions, you would use code like shown below:

public void updateUnreadBadgeCount()
{
    int unreadMessageCount = HelpshiftCampaigns.GetCountOfUnreadMessages();
    // Proceed to update the badge count with unreadMessageCount value.
}

On plugin version 2.9.0, you can retrieve the unread campaigns messages count and display the count as shown below:

public void updateUnreadBadgeCount()
{
    HelpshiftCampaigns.RequestUnreadMessagesCount()
}


public void didReceiveUnreadMessagesCount(int count) {
    // Proceed to update the badge count with the received value.
}