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.
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.
- Configuration details
Option: | enableLogging |
Values: | YES / NO |
Default: | NO |
Min SDK | v10.0.0 |
Supported by: | installWithPlatformId:domain:config: |
Example:
- Objective-C
- Swift
NSDictionary *config = @{ @"enableLogging":@YES };
[Helpshift installWithPlatformId:@"YOUR_PLATFORM_ID"
domain:@"YOUR_DOMAIN_NAME"
config:config];
let config = ["enableLogging": true]
Helpshift.install(withPlatformId: "YOUR_PLATFORM_ID", domain: "YOUR_DOMAIN", 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.
- Configuration details
Option | enableContactUs |
Values | "ALWAYS" / "AFTER_VIEWING_FAQS" / "AFTER_MARKING_ANSWER_UNHELPFUL" / "NEVER" |
Default | nil |
Min SDK | v10.0.0 |
Supported by | showFAQs , showFAQSection , showSingleFAQ |
Example:
- Objective-C
- Swift
NSDictionary *config = @{ @"enableContactUs": @"AFTER_VIEWING_FAQS" };
[Helpshift showFAQs:self config:config];
let config = ["enableContactUs": "AFTER_VIEWING_FAQS"]
Helpshift.showFAQs(self, config: config)
Best Practices
- Provide tier-based support by setting enableContactUs to
ALWAYS
for paid users andAFTER_VIEWING_FAQS
for unpaid ones. - Provide country based support by setting enableContactUs to
ALWAYS
for local users andAFTER_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
.
- Configuration details
Option: | enableInAppNotification |
Values: | YES / NO |
Default: | YES |
Min SDK | v10.0.0 |
Supported by: | installWithPlatformId:domain:config: |
Example:
- Objective-C
- Swift
NSDictionary *config = @{ @"enableInAppNotification":@YES };
[Helpshift installWithPlatformId:@"YOUR_PLATFORM_ID"
domain:@"YOUR_DOMAIN_NAME"
config:config];
let config = ["enableInAppNotification": true]
Helpshift.install(withPlatformId: "YOUR_PLATFORM_ID", domain: "YOUR_DOMAIN", 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
- Configuration details
Option: | inAppNotificationAppearance |
Sub-Options: | bannerBackgroundColor / textColor |
Min SDK | v10.0.0 |
Supported by: | installWithPlatformId:domain:config: |
Example:
- Objective-C
- Swift
NSDictionary *config = @{ @"inAppNotificationAppearance": @{
@"bannerBackgroundColor": @"000000",
@"textColor": @"FFFFFF"
}
};
[Helpshift installWithPlatformId:@"YOUR_PLATFORM_ID"
domain:@"YOUR_DOMAIN_NAME"
config:config];
let config = ["inAppNotificationAppearance": ["bannerBackgroundColor":"000000", "textColor":"FFFFFF"]]
Helpshift.install(withPlatformId: "YOUR_PLATFORM_ID", domain: "YOUR_DOMAIN", 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.
- Configuration details
Option | presentFullScreenOniPad |
Values | YES / NO |
Default | NO |
Min SDK | v10.0.0 |
Supported by | showConversation |
Example:
- Objective-C
- Swift
NSDictionary *config = @{ @"presentFullScreenOniPad": @YES };
[Helpshift showConversationWith:self config:config];
let config = ["presentFullScreenOniPad": true]
Helpshift.install(withPlatformId: "YOUR_PLATFORM_ID", domain: "YOUR_DOMAIN", 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:
- Disable user-initiated screenshots - players cannot send images without being requested by an Agent.
- 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".
- Configuration details
Option | enableFullPrivacy |
Values | YES / NO |
Default | NO |
Min SDK | v10.0.0 |
Supported by | showConversation , showFAQs |
Example:
- Objective-C
- Swift
NSDictionary *config = @{ @"fullPrivacy": @YES };
[Helpshift showConversationWith:self config:config];
let config = ["fullPrivacy": true]
Helpshift.showConversation(with: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.