Skip to content
Open
2 changes: 1 addition & 1 deletion docs/sdkx-unreal/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Guide to integrating the Unreal Engine plugin for the Helpshift SDK X.
- SDK X is functional only above API Level 24 i.e Android OS 7 Nougat and above.
- The `minSDKVersion` in code is kept as API Level 19 to allow importing the SDK and compiling in apps that allow installation till API Level 19 i.e Android 4.4 KitKat.
- If your app is installed on a device below API level 24 (i.e below Android OS 7 Nougat) then you can choose to have a different medium for providing support. For example, Email, Web etc.
- Supported iOS versions: iOS 14 and above
- Supported iOS versions: iOS 15 and above
- For details regarding Helpshift SDK's support policy, please refer to [this article](https://support.helpshift.com/hc/en/13-helpshift-technical-support/faq/1217-sdk-x-os-technical-support-policy/).

<Admonition type="info" title="Note">
Expand Down
29 changes: 29 additions & 0 deletions docs/sdkx-unreal/impact-analysis.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,35 @@ Since all the Helpshift initialization takes place on a background thread, the H

</Admonition>

## v10.5.0

**iOS**

<Admonition type="info" title="Note">

Tested with Unreal Engine 5.7, on macOS 15.7.2, with Xcode 26.3.0 built demo app on iOS 26.3.1 (iPhone 15 Plus). Memory ssage will increase with number of messages in a conversation.

</Admonition>

#### Disk space

When an Unreal iOS app is integrated with `HelpshiftX.framework`, the increase in the size of IPA file is around `732` KB.

#### Ram usage

The following is the memory usage of Helpshift APIs in debug mode. (Values are approximate)

| | |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| **Helpshift's Chat screen (<code>showConversation:</code>)** | adds <code>5.3</code> MB (This depends on number of messages on the chat screen). |
| **Helpshift's FAQs screen (<code>showFAQs:</code>)** | adds <code>2.1</code> MB. |
| **Helpshift's FAQ section screen (<code>showFAQSection:</code>)** | adds <code>1.7</code> MB. |
| **Helpshift's single FAQ screen (<code>showFAQ:</code>)** | adds <code>2.3</code> MB. |

**Android**

// TODO add android impact analysis here

## v10.4.0

**iOS**
Expand Down
104 changes: 104 additions & 0 deletions docs/sdkx-unreal/migration-guide-ios-1050.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
sidebar_position: 145
title: Migration Guide - SDK X 10.5.0
description: "This migration guide will walk you through the steps you need to take in order to migrate from SDK X 10.4.1 and below to SDK X 10.5.0 and above"
---

import {
Admonition,
CodeBlock,
Tabs,
TabItem,
Intro,
} from "@site/src/components/forDocs";

<Intro>

This migration guide will walk you through the steps you need to take in order to migrate from SDK X 10.4.x and below to SDK X 10.5.0 and above.

</Intro>

# Intro

With SDK X 10.5.0, we have made changes to some public APIs. If you are upgrading from SDK X 10.4.x or below, this page documents the changes you will need to make in your app after upgrading to SDK X 10.5.0. If you are integrating SDK X 10.5.0 or above from scratch, please refer [Getting Started](/sdkx-unreal/getting-started) page instead.

## Deprecated APIs {#deprecated-apis}

The existing push notification handling API - `HandlePushIos()` - has been deprecated. Push handling should now be done in the iOS layer.

For notifications received when the app is in foreground, replace usage of deprecated API in `HandlePushIos()` with [`handleForegroundNotification:withCompletionHandler:`](/sdkx-unreal/notifications-ios/#push-delegates-foreground) -

```objc
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
- (void) userNotificationCenter:(UNUserNotificationCenter *)center

willPresentNotification:(UNNotification *)notification
withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
NSDictionary *userInfo = notification.request.content.userInfo;
NSString *origin = userInfo[@"origin"];

if([@"helpshift" isEqualToString:origin]) {
[Helpshift handleForegroundNotification:userInfo
withCompletionHandler:completionHandler];
} else {
// Handling for non-helpshift push notifications received when app is in foreground
}
}
```

For notifications received when the app is launched from a push, replace usage of deprecated API in `HandlePushIos()` with [`handleBackgroundNotificationClick:withCompletionHandler:`](/sdkx-unreal/notifications-ios/#push-delegates-background) -

```objc
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
- (void) userNotificationCenter:(UNUserNotificationCenter *)center

didReceiveNotificationResponse:(UNNotificationResponse *)response
withCompletionHandler:(void (^)(void))completionHandler
{
NSDictionary *userInfo = response.notification.request.content.userInfo;
NSString *origin = userInfo[@"origin"];
if([@"helpshift" isEqualToString:origin]) {
[Helpshift handleBackgroundNotificationClick:userInfo
withCompletionHandler:completionHandler];
} else {
// Handling for non-helpshift push notifications received when app is in background or killed
}
}
```

## New APIs {#new-apis}

SDK X 10.5.0 introduces following new APIs for handling push notifications. For full details on how to configure push notifications in your app, please refer the [Notifications](/sdkx-unreal/notifications-ios) page.

#### Unreal API for registering push token with Helpshift

**API Signature** - `HelpshiftLibrary::RegisterPushTokenIos(const TArray<uint8>& Token)`

**Purpose** -

- Register the given push token with Helpshift.
- This is an Unreal API and should be called from Unreal layer, ideally in response to `FCoreDelegates::ApplicationRegisteredForRemoteNotificationsDelegate` Unreal delegate.
- Note that the existing `RegisterPushToken(const FString& Token)` API is still available and should be used for registering push tokens on Android.

**Example usage** -

```c++
void UHelpshiftDemoGameInstance::OnStart()
{
Super::OnStart();

#if PLATFORM_IOS
// Listen for push token received delegate.
FCoreDelegates::ApplicationRegisteredForRemoteNotificationsDelegate.AddLambda([](const TArray<uint8>& Token) {
UHelpshiftLibrary::RegisterPushTokenIos(Token);
});

// Register for remote push notifications. This internally calls the system
// API that presents push permission prompt to the user.
FIOSPlatformMisc::RegisterForRemoteNotifications();
#endif
}
```

#### API for handling notifications in NotificationService extension

**API signature** - `handleBackgroundNotification:withContentHandler:`

**Purpose** - Handle notification received by app's NotificationService extension. Meant to be called from `didReceive:withContentHandler:` notification service method. Check [this section](/sdkx-unreal/notifications-ios/#notification-service) for usage.
Loading
Loading