Skip to main content

Upgrading from 1.7.0 to 1.8.0

Please note that we have deprecated some APIs. If you have questions or feedback, please Contact Us

List of deprecated APIs

Deprecated APINew API
HelpshiftCocos2dx::getCountOfUnreadMessages();HelpshiftCocos2dx::requestUnreadCampaignsMessagesCount(...);

GetCountOfUnreadMessages

On SDK version 1.7.0 or below, you can get the current count of unread campaign messages in the user's Inbox as shown below :


int unreadMessagesCount = HelpshiftCocos2dx::getCountOfUnreadMessages();

On SDK version 1.8.0 and above, you can asyncronously check the current count of unread campaign messages as shown below :


void unreadCampaignsMessageCountHandler(int cnt) {
printf("Unread campaigns message count: %d\n", cnt);
}

HelpshiftCocos2dx::requestUnreadCampaignsMessagesCount(*unreadCampaignsMessageCountHandler);