Skip to main content

Upgrading from 1.6.0 to 1.7.0

The Helpshift SDK v1.7.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 APINew API
HelpshiftCocos2dx::isConversationActive();HelpshiftCocos2dx::checkIfConversationActive(...);
HelpshiftCocos2dx::setSDKLanguage(...);HelpshiftCocos2dx::setLanguage(...);
HelpshiftCocos2dx::getNotificationCountFromRemote(...);HelpshiftCocos2dx::requestUnreadMessagesCount(...);

Check active Conversation

On Plugin version 1.6.0 or below, you can check if an active Conversation exists as shown below :


if (HelpshiftCocos2dx::isConversationActive()) {
// Active Conversation.
} else {
// No open Conversation.
}

On Plugin version 1.7.0 and above, you can asyncronously check if an active Conversation exists as shown below :


void conversationActive(bool isActive) {
if (isActive == "true") {
// Active Conversation.
} else {
// No open Conversation.
}
}
HelpshiftCocos2dx::checkIfConversationActive(conversationActive);

Set SDK language

On Plugin version 1.6.0 and below, you can set the SDK language as shown below :


HelpshiftCocos2dx::setSDKLanguage("fr");

On Plugin version 1.7.0 and above, you can set the SDK language as shown below :


HelpshiftCocos2dx::setLanguage("fr");

Get count of unread messages

On Plugin version 1.6.0 and below, you can get the count of unread messages as shown below :


int notifCount = HelpshiftCocos2dx::getNotificationCountFromRemote(false);

On Plugin version 1.7.0 and below, you can get the count of unread messages as shown below :


void receivedMessageCount(int count) {
printf("Unread message count: %d\n", count);
}
HelpshiftCocos2dx::requestUnreadMessagesCount(false, receivedMessageCount);