Skip to main content

API Options

Helpshift provides several configuration options that you can use to customize the behavior of the SDK. Use these options in conjunction with our Helpshift APIs.

Note

All the public APIs in the SDK should be called after initializing the SDK via Helpshift installWithPlatformId API

enableLogging

Upon setting enableLogging to YES, Helpshift SDK logs will be generated in the Xcode console. This will be useful for debugging the SDK during integration.

Option:enableLogging
Values:YES / NO
Default:NO
Min SDKv10.0.0
Supported by:installWithPlatformId:domain:config:

Example:

NSDictionary *config = @{ @"enableLogging":@YES };

[Helpshift installWithPlatformId:@"YOUR_PLATFORM_ID"
domain:@"YOUR_DOMAIN_NAME"
config:config];

enableContactUs

Controls the visibility of the Helpshift Contact Us button when a user is viewing FAQs. You can customize this option to make it easier or more difficult to contact support. If specified, this configuration takes precedence over the value of Enable Contact Us set on admin dashboard.

OptionenableContactUs
Values"ALWAYS" / "AFTER_VIEWING_FAQS" / "AFTER_MARKING_ANSWER_UNHELPFUL" / "NEVER"
Defaultnil
Min SDKv10.0.0
Supported byshowFAQs, showFAQSection, showSingleFAQ

Example:

NSDictionary *config = @{ @"enableContactUs": @"AFTER_VIEWING_FAQS" };
[Helpshift showFAQs:self config:config];

Best Practices

  • Provide tier-based support by setting enableContactUs to ALWAYS for paid users and AFTER_VIEWING_FAQS for unpaid ones.
  • Provide country based support by setting enableContactUs to ALWAYS for local users and AFTER_VIEWING_FAQS for foreign ones. Example Code:

CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
CTCarrier *carrier = [netinfo subscriberCellularProvider];
NSString *enableContactUsValue = @"AFTER_VIEWING_FAQS";

if([[carrier mobileCountryCode] isEqualToString:@"<LOCAL_COUNTRY_CODE>"]) {
enableContactUsValue = @"ALWAYS";
}

NSDictionary *config = @{ @"enableContactUs": enableContactUsValue };
[Helpshift showFAQs:self config:config];

enableInAppNotification

If you do not want the in-app notifications support provided by the Helpshift SDK, set this flag to NO.

Option:enableInAppNotification
Values:YES / NO
Default:YES
Min SDKv10.0.0
Supported by:installWithPlatformId:domain:config:

Example:

NSDictionary *config = @{ @"enableInAppNotification":@YES };

[Helpshift installWithPlatformId:@"YOUR_PLATFORM_ID"
domain:@"YOUR_DOMAIN_NAME"
config:config];

inAppNotificationAppearance

This config represents the appearance of the in-app notification in the SDK. When the agent/bot sends a message and the user is using the app, an in-app banner is shown and the appearance of that banner can be customized using this dictionary

Option:inAppNotificationAppearance
Sub-Options:bannerBackgroundColor / textColor
Min SDKv10.0.0
Supported by:installWithPlatformId:domain:config:

Example:

NSDictionary *config = @{ @"inAppNotificationAppearance": @{
@"bannerBackgroundColor": @"000000",
@"textColor": @"FFFFFF"
}
};

[Helpshift installWithPlatformId:@"YOUR_PLATFORM_ID"
domain:@"YOUR_DOMAIN_NAME"
config:config];

presentFullScreenOniPad

The presentFullScreenOniPad flag will determine whether to present support views in UIModalPresentationFullScreen or UIModalPresentationFormSheet modal presentation style on iPad. This config has no effect on iPhones.

The default value is NO, presents support views as UIModalPresentationFormSheet. When the value is set to YES, support views are presented in UIModalPresentationFullScreen. Use this setting to show Helpshift in full-screen mode.

OptionpresentFullScreenOniPad
ValuesYES / NO
DefaultNO
Min SDKv10.0.0
Supported byshowConversation

Example:

NSDictionary *config = @{ @"presentFullScreenOniPad": @YES };
[Helpshift showConversationWith:self config:config];

enableFullPrivacy

In scenarios where the user attaches objectionable content in the screenshots, it becomes a huge COPPA concern. The enableFullPrivacy option will help solve this problem.

Setting the enableFullPrivacy option to YES ensures full COPPA compliance by doing the following:

  1. Disable user-initiated screenshots - players cannot send images without being requested by an Agent.
  2. Do not collect any of the following personal information:
    • Mobile country code, mobile network code and carrier name.
    • Country code and country.
    • Custom meta-data that is labeled "private-data".
OptionenableFullPrivacy
ValuesYES / NO
DefaultNO
Min SDKv10.0.0
Supported byshowConversation, showFAQs

Example:

NSDictionary *config = @{ @"fullPrivacy": @YES };
[Helpshift showConversationWith:self config:config];

Best Practices

In your registration process, ask your user for his/her age. If the user's age is 13 or younger, set enableFullPrivacy to YES. This way, you comply with COPPA for your children users, but collect valuable user and device data for your other users.

Theming the SDK

Please check design page to apply your styles and theming to the SDK.

Tracking

This config represents the tracking of user actions. For more information, please check tracking.