Skip to main content

Getting Started

Follow these simple steps to add Helpshift in-app support to your iOS app right away.

Requirements

  • Xcode 12.0 and above
  • Cocoapods v1.10.0
  • Supported iOS versions:
    • iOS 13 and above
  • For details regarding Helpshift SDK's iOS support policy, please refer to this article.

Automated Integration using Cocoapods

To start using SDK X v10.3.0 in your project, add the following line to your Podfile:

pod 'HelpshiftX', '10.3.0'

And run pod install or pod update to refresh your cocoapods dependencies.

You can now move on to Initializing Helpshift in your App.

Automated Integration using Swift Package Manager

To start using Helpshift v10.3.0 in your SPM project, add the following package URL to your project's "Package Dependencies" section

https://github.com/helpshift/HelpshiftX

For version rules, we recommend using either "Exact" or "Up to Next Minor" and manually updating the version number when a major version of Helpshift SDK X is released.

You can now move on to Initializing Helpshift in your App.

Manual Integration

Get the latest SDK zip

Download the latest Helpshift iOS SDK.

The zip file contains:

HelpshiftX.xcframeworkThe HelpshiftX framework
NOTICE.txtLicense information about third-party code.
Note

Non-bitcode build of SDK X

Since bitcode has been deprecated by Apple starting Xcode 14, SDK X builds don't contain bitcode starting from 10.3.0 release.

Add the latest stable SDK release to your project

  • Unzip the SDK, and drag-and-drop HelpshiftX.xcframework into your Xcode project
  • In the General section of your app target, verify that the HelpshiftX.xcframework is present in the Framework, Libraries, and Embedded Content section with the option Embed and Sign selected from the Embed options dropdown.   
  • After successful integration, Build Phases should look like this:   
Note

Add NSPhotoLibraryUsageDescription key in your application's info.plist file

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.

NSPhotoLibraryUsageDescription 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

The following instructions apply only to versions below SDK X 10.2.0.

Along with NSPhotoLibraryUsageDescription (as mentioned above), also add NSCameraUsageDescription and NSMicrophoneUsageDescription key in your application's info.plist file

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.

NSCameraUsageDescription Description text: "We need to access the camera to allow users to click images meant to be sent as an attachment for help and support reasons."

NSMicrophoneUsageDescription Description text: "We need to access the microphone to allow users to record and send videos meant to be sent as an attachment for help and support reasons."

Note that this is just a suggested description. If you need localisations for the same, please Contact Us

Start using Helpshift

Helpshift is now integrated in your app and ready to collect meaningful data about your users.

Initializing Helpshift in your app

  1. First, create an app on the Helpshift Dashboard

  2. Create an app with iOS as a selected Platform

Helpshift uniquely identifies each registered App using a combination of 2 tokens.

Platform IDYour App's unique platform id (App's App Id on dashboard is your platform Id)
Domain NameThis is your Helpshift domain name e.g. happyapps.helpshift.com

To obtain these values:

  1. Go to your Helpshift dashboard
  2. Navigate to Settings > SDKs (for Developers)
  3. Select your App and from the dropdowns
  4. Copy the two tokens present in the "iOS" table

Initialize the SDK by calling installWithPlatformId: method.

You can optionally pass the configuration dictionary to installWithPlatformId: API. To see supported configurations, check the SDK Configuration page.

@import HelpshiftX;
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
NSDictionary *config = @{} // Your config
[Helpshift installWithPlatformId:@"YOUR_APP_ID"
domain:@"YOUR_DOMAIN"
config:config];
...
return YES;
}

Initializing Helpshift in your app for China

A special install config key, isForChina, should be used for integrating Helphift SDK for China region. This config key accepts a boolean value. Pass true if you are integrating the SDK in an app for China region. The value defaults to false if left unspecified.

Add the following code in your AppDelegate class -

@import HelpshiftX;
...
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
NSDictionary *config = @{
...
@"isForChina" : @YES,
...
};
[Helpshift installWithPlatformId:@"YOUR_PLATFORM_ID" domain:@"YOUR_DOMAIN" config:config];
...
return YES;
}
Important

Placing the install call

You should not place the install call anywhere other than application:didFinishLaunchingWithOptions: Placing it elsewhere might cause unexpected runtime problems. Helpshift install call will throw InstallException in case the validation of the SDK keys fail.