Cocos2d-x plugin for Helpshift SDK helps you utilize Helpshift from your game's C++ codebase.
With version 5.0.0 (SDK version 7.5.3), Helpshift SDK has dropped support for iOS 9. If you wish to keep supporting iOS 9 devices for your apps, please read the KB Article to support Helpshift on older OS versions.
If you have a project with Xcode version prior to Xcode 9, you could use the build mentioned here.
Helpshift Cocos2d-x package comes in two variants:
Download SDK v5.5.1-withCampaigns
The zip file contains:
ios/Classes
folder into your Xcode project.ios/sdk
folder drag & drop Helpshift.framework
into your cocos Xcode project.Build Phases
of your app target, verify that Helpshift.framework
is in the Link Binary with Libraries section.Build Phases
of your app target, add a new Copy Files
section. Set it’s Destination to Frameworks and add Helpshift.Framework
to this section.Build Phases
of your app target, add a new Run Script
phase. Ensure this build phase falls after the Copy Files
phase. Copy paste the following in the script text box:bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Helpshift.framework/strip_frameworks.sh"
Build Phases
should look like this:
show me Always Embed Swift Standard Libaries
under Build Settings
to YES.@loader_path/Frameworks
flag under Runpath Search Paths
section.-fmodules
and -fcxx-modules
flags under the Other C Flags
section in both Debug and Release. Be careful while adding these flags in Debug and Release, because if you override the default flags you might face build errors. The Other C Flags
section would look this after adding mentioned flags:
show me While building Xcode project if you are facing an error stating "Helpshift module not found" then please check again if you have integrated Helpshift.framework correctly as mention above. And then check if Xcode has identified and correctly added path in 'Framework Search Paths' section where you have placed Helpshift.framework in your project, if not please add it.
If you want to compile your Xcode project with bitcode enabled, please use Helpshift.framework present under 'ios/sdk/Bitcode' folder.
If your app does not use this permission, you would need to add this key as well as description for the same. Not adding this key-description pair might cause app rejection.
Description text: “We need to access photos library to allow users manually pick images meant to be sent as attachment for help and support reasons.”
Note that this is just a suggested description. If you need localisations for the same, please Contact Us
Please replace all the old files with new files.
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(); }