You're 3 steps away from adding great in-app support to your Unity game.
Guide to integrating the Unity plugin for the Helpshift SDK X which you can call from your C# and Javascript game scripts.
HelpshiftX SDK .zip folder includes:
.unitypackage
which you can import through the Unity package import procedure.helpshiftX-plugin-unity-version.unitypackage
into your Unity game:helpshiftX-plugin-unity-version.unitypackage
file to import the Helpshift SDK.On adding Helpshift package to your project you will see a menu option Helpshift/Verification
in the main menu bar of Unity IDE.
You will need to provide the Domain name
and App ID (same as Platform ID)
for either Android or iOS platform and then Verify
the package.
Wait for package verification to be successful.
This verification is mandatory to avoid Android/iOS build failures.
This verification needs to be done only once.
You can commit the files generated in Assets/Helpshift/Editor/Resources/
to your version control system to share this verification result across developers in your organisation.
When the “User Attachments” feature is enabled from the In-app SDK Configuration section, the SDK allows the user to upload the attachments. The attachments can be picked from the Photo Library or can be captured directly using the camera. The options for these sources look like:
To use the camera and photo library, Apple requires the app to have Usage Description strings in the Info.plist while. Failing to add these strings might result in app rejection. The following strings are needed for the attachment feature:
Key | Suggested string | Notes |
---|---|---|
NSPhotoLibraryUsageDescription | “We need to access photos library to allow users manually pick images meant to be sent as an attachment for help and support reasons.” | This is not needed if your app is iOS 11 or above. Below iOS 11, this key is compulsory else the app may crash when user tries to open the photo library for attaching photos. |
NSCameraUsageDescription | “We need to access the camera to allow users to click images meant to be sent as an attachment for help and support reasons.” | This key is needed for capturing a photo using camera and attaching it. |
NSMicrophoneUsageDescription | “We need to access the microphone to allow users to record videos using camera meant to be sent as an attachment for help and support reasons.” | This key is needed for capturing a video using camera and attaching it. |
Note that the above strings are just a suggested description. If you need localisations for the same, please Contact Us
End-users can attach files such as pdf, video, etc in their issues. For iOS 10 and below, to access files in the “Files” app of iOS, developers will need to add iCloud capability with iCloud Documents services enabled. For more info please refer the Prerequisites section here. show me
To use Helpshift's APIs, please import the Helpshift's namespace like below
using Helpshift;
First, create an app on the Helpshift Dashboard show me
Create an app with iOS as a selected Platform
show me
Helpshift uniquely identifies each registered App with a combination of 2 tokens:
Domain Name
Platform ID
Settings
>SDK (for Developers)
in your agent dashboard.
Select your App and check webchat as a platform from the dropdowns and copy
the 2 tokens to be passed when initializing Helpshift.
show me
Initialize Helpshift by calling the method install(appId, domain) API
using Helpshift; . . . public class MyGameControl : MonoBehaviour { private HelpshiftSdk help; ... void Awake() { help = HelpshiftSdk.GetInstance(); var configMap = new Dictionary<string, object>(); help.Install(appId, domainName, configMap); } ... }
If you intend to initialize the SDK from Xcode using Objective C, You can specify Domain Name, Platform ID and other install configurations in the Objective-C code. To do this you need to override application:didFinishLaunchingWithOptions
in HsUnityAppcontroller
as shown below.
#import <HelpshiftX/HelpshiftX.h> #import "HelpshiftX-Unity.h" - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Set install configurations NSDictionary *installConfig = @{@"enableInAppNotification":@YES}; // Make install call [Helpshift installWithPlatformId:@"<your_platform_id>" domain:@"<your_domain_name>" config:installConfig]; return [super application:application didFinishLaunchingWithOptions:launchOptions]; }
Helpshift is now integrated in your app. You should now use the support APIs inside your app to experience the functionality provided by the Helpshift SDK