Cocos2d-x plugin for Helpshift SDK helps you utilize Helpshift from your game's C++ codebase.
Due to a bug in Xcode 10+, the Helpshift SDK will not be compatible with iOS versions below 9.3. Unfortunately till the time Apple fixes the bug with Xcode 10.2 or higher, we have decided to drop support for iOS 9.2 and below.
If you have a project with Xcode version prior to Xcode 9, you could use the build mentioned here.
The zip file contains:
Add the following frameworks to Link Binary with Libraries
-
CoreGraphics
QuartzCore
CoreText
SystemConfiguration
CoreTelephony
UIKit
libsqlite3.tbd
libicucore.tbd
libz.tbd
Security
QuickLook
CoreLocation
MobileCoreServices
CoreSpotlight
Photos
WebKit
GameController
(required by cocos2d-x)MediaPlayer
(required by cocos2d-x)Add the contents of the ios/Classes
folder into your Xcode project.
Add the ios/sdk
folder to your Xcode project to add the Helpshift iOS native SDK.
In the Build Settings of your Xcode project, '-ObjC' flag should be added in the 'Other linker flags' section.
show me
Helpshift SDK uniquely identifies your App with the combination of:
To get the API Key
, Domain Name
and the App ID
, navigate to Settings
>SDK (for Developers)
in your agent dashboard and scroll down to "Initializing Helpshift" section. show me
Select your App from the dropdown and copy the three tokens to be passed when initializing Helpshift.
Initialize Helpshift by including HelpshiftCocos2dx.h
and
calling HelpshiftCocos2dx::install
in the AppDelegate::applicationDidFinishLaunching()
function of your AppDelegate.cpp
:
#include "HelpshiftCocos2dx.h" ... bool AppDelegate::applicationDidFinishLaunching() { HelpshiftCocos2dx::install("<YOUR_API_KEY>", "<YOUR_HELPSHIFT_DOMAIN>.helpshift.com", "<YOUR_APP_ID>"); ... }
Helpshift is now integrated in your app. You should now use the support APIs to present FAQ or conversation screens inside your app.
Run your app, and try starting a test conversation using the showConversation
API call.
Then goto your Helpshift agent dashboard and reply to experience the in-app messaging.
Sample usage for FAQs and conversation APIs:
// Presenting FAQs to your customers void GameSettingsScene::menuHelpCallback(CCObject* pSender) { HelpshiftCocos2dx::showFAQs(); } // Starting a conversation with your customers void GameSettingsScene::menuConversationCallback(CCObject* pSender) { HelpshiftCocos2dx::showConversation(); }