Heads up! These docs are for Helpshift SDK 4.x for Unity. Looking for latest SDK docs? Click here →

Troubleshooting

SDK integration

"Nothing to import!" message on importing helpshift unity package


nothing-to-import.png

Only the following versions of Unity are compatible with APFS on macOS 10.13 High Sierra:

  • 5.5.5 patch 2 or later (install Visual Studio for Mac for script editing)
  • 5.6.4 patch 3 or later
  • 2017.1.2 patch 3 or later
  • 2017.2.0 patch 3 or later

Using any other Unity version causes the assets to not appear in the Unity Editor.

For more details about Unity and macOS 10.13 High Sierra compatibility, Read the official unity thread here.

App crashing on launching support session

If you get app crashing when the game is built using Unity 5.4, make sure the platform is set to iOS for HsUIResourceBundle.bundle in Unity platform inspector.

Strings not localized in games created on Unity 5.4

If you don't see localized strings when the game is built using Unity 5.4, make sure the platform is set to iOS for HsLocalization.bundle in Unity platform inspector.

Xcode project includes Android resources

If you see Android resources are added to the Xcode project when the game is built using Unity 5.4, make sure the platform for Plugins/Android/appcompat and Plugins/Android/helpshift are set to Android

App crashes on selecting screenshot button

Applicable to version 2.4.0 and above on iOS 10

Add NSPhotoLibraryUsageDescription key in you application info plist file

Resources missing in the SDK

If you are seeing resources like chat bubbles, attachment buttion icon missing, please follow the below steps:

Select the HsUIResourceBundle in the project


select-ios-in-project.png

Select the HsUIResourcesBundle inside the project. You can locate the bundle at path Assets/Helpshift/Plugins/iOS

Select iOS in the file inspecter


select-ios-in-inspector.png

Check iOS in the file inspector. This needs to be done for the HsLocalization bundle as well.

Explanation

From unity 5.4.x and above, we have observed that unity does not add .bundle files automatically into the xcode project. By selecting iOS in the file inspector, unity will copy the resources correctly into the xcode project.

Strings missing in the SDK UI


If you cannot see strings in the SDK UI, go to the XCode project and navigate to the Build Phases -> Copy Bundle Resources The issue here is that the HSLocalization files have not been added correctly. This will be seen by the HelpshiftLocalizable.string files seen in red.

If you are using the Facebook or any other plugin which uses the XCodeEditor for Unity project, please follow the below steps to fix the problem.

Increase PostProcessBuildAttribute

Make the value of the PostProcessBuild attribute in the HelpshiftPostProcess.cs file to something greater than all other attribute values.

Explanation

The XCodeEditor project messes up with the way in which PBXVariantGroups are added to an XCode project. Due to this, the HelpshiftLocalizable VariantGroup gets removed and hence those files cannot be found. By using the above method, we essentially make sure that Helpshift's PostProcessBuildPlayer script runs after all other plugins have been integrated.

If you still can't get it to work or if you have any other concerns, please Contact Us

CFBundleShortVersionString crash

If you are seeing app crashes just after launching the app, please make sure to set the CFBundleShortVersionString (Bundle versions string, short) in the <YOUR_APP>-Info.plist file of your XCode project.

*** Terminating app due to uncaught exception NSInvalidArgumentException,
reason: *** setObjectForKey: object cannot be nil (key: av)
*** First throw call stack:
(0x2da11f0b 0x381a8ce7 0x2d94d1bf 0x654897 0x6643ab 0x38691d53 0x38696cbd 0x38693c6f 0x386975f1 0x386978dd 0x387c2c17 0x387c2adc)
libc++abi.dylib: terminating with uncaught exception of type NSException

Incorrect iOS initialization code crash

If just after launching the app, you get a crash that has readLocalConfig in it's call stack, then make sure that you're using the correct Helpshift initialization code for iOS. When testing again, after using the correct initialization code, delete the app from your device or simulator and do a fresh install.

2014-08-26 13:28:54.862 HS Demo[96593:3a03] -[__NSCFString objectAtIndex:]: unrecognized selector sent to instance 0x9e27a30
2014-08-26 13:28:54.865 HS Demo[96593:3a03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString objectAtIndex:]: unrecognized selector sent to instance 0x9e27a30'
*** First throw call stack:
(
    0   CoreFoundation                      0x025df1e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x01c918e5 objc_exception_throw + 44
    2   CoreFoundation                      0x0267c243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
    3   CoreFoundation                      0x025cf50b ___forwarding___ + 1019
    4   CoreFoundation                      0x025cf0ee _CF_forwarding_prep_0 + 14
    5   HS Demo                             0x0001e305 -[HSConfigController updateConfigFromDictionary:] + 1238
    6   HS Demo                             0x0001e615 -[HSConfigController readLocalConfig] + 659
    7   HS Demo                             0x00015994 __43+[Helpshift handleBecomeActiveNotification]_block_invoke_5 + 96
    8   libdispatch.dylib                   0x01f3a7b8 _dispatch_call_block_and_release + 15
    9   libdispatch.dylib                   0x01f4f4d0 _dispatch_client_callout + 14
    10  libdispatch.dylib                   0x01f3d047 _dispatch_queue_drain + 452
    11  libdispatch.dylib                   0x01f3ce42 _dispatch_queue_invoke + 128
    12  libdispatch.dylib                   0x01f3dde2 _dispatch_root_queue_drain + 78
    13  libdispatch.dylib                   0x01f3e127 _dispatch_worker_thread2 + 39
    14  libsystem_pthread.dylib             0x0227edab _pthread_wqthread + 336
    15  libsystem_pthread.dylib             0x02282cce start_wqthread + 30
)
libc++abi.dylib: terminating with uncaught exception of type NSException

App crash when Helpshift is not initialised

If you have added Helpshift library to your project but have not called HelpshiftCore.init, running the app will lead to HelpshiftCore.init not called exception. If you are not calling the Helpshift install method, you need to remove the HsUnityAppController.mm file to fix this. This file needs Helpshift install call to be done via Objective C, else it will throw the error mentioned above.

Known issues

Push notification behavior when app is killed

If the app is killed and the end user taps on Helpshift's push notification, the app will open but will not redirect to the SDK screens. This happens only if your app has a splash screen shown to the user on the app launch. In this scenario, the application(_:didReceiveRemoteNotification:fetchCompletionHandler:) method is called by system and Helpshift's handleRemoteNotification API is called from it which takes the rootViewController. Since the rootViewController is not initialized when the splash screen is showing, SDK is not able to render the UI. If you are able to provide a initialized rootViewController in this case, SDK will work properly in this scenario as well.

This behavios does not happen if you use UNUserNotifications framework for the push notifications.

PNG crush compilation errors

Unity sometimes adds android resources to xcode project. This will cause compilation issues for the png crush tool. This issue is caused due to Apple converts traditional PNG images to a optimised CgBI format using a proprietary version of the public domain pngcrush tool making the file different from the PNG standards. This optimisation reduces the size of PNG image by almost half, making our asset folder very small in size. When Android resources are added into xcode project, the png crush tool is not able to read the format of the files.

The solution for this issue is to unselect iOS from the file inspector for assets which are used by Android. For more details on the root issue, please refer here