Getting Started iOS

Cocos2d-x plugin for Helpshift SDK helps you utilize Helpshift from your game's C++ codebase.

Requirements

  • Xcode 9 and above.
  • Supported iOS versions:

If you have a project with Xcode version prior to Xcode 9, you could use the build mentioned here.

Download the Cocos2d-x plugin for Helpshift

Download SDK v1.9.0

The zip file contains:

v3.x
Folder containing the files for Cocos2dx version 3.x
v2.x
Folder containing the files for Cocos2dx version 2.x

Adding the Helpshift iOS plugin

  1. 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)
  2. Add the contents of the ios/Classes folder into your Xcode project.

  3. 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

Initializing Helpshift in your App

Helpshift SDK uniquely identifies your App with the combination of:

API Key
Your unique developer API Key.
Domain Name
Your Helpshift domain name. For example : foo.helpshift.com
App ID
A unique ID assigned to your app.

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>");
    ...

}

Start using Helpshift

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();
}

Next up

Helpshift APIs

Discover ways to do customer support via Helpshift.

Notifications

Configure Push and In-app notifications.

Tracking

Track events and user actions. Attach custom metadata to every conversation.

Reviews & Feedback

Asking for reviews and feedback.