-
Notifications
You must be signed in to change notification settings - Fork 27
SDK X Unreal 10.5.0 docs #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jaydeep-helpshift
wants to merge
9
commits into
main
Choose a base branch
from
sdkx-unreal-10.5.0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
66c3018
Update unreal plugin version
jaydeep-helpshift 242ac64
Add unreal proactive engagement doc
jaydeep-helpshift 4447c64
Deprecate unreal outbound support page
jaydeep-helpshift 580b9e8
Update unreal iOS notifications page
jaydeep-helpshift 2878e0e
Add unreal 10.5.0 migration guide
jaydeep-helpshift 4966aec
Update iOS version in Unreal getting started
jaydeep-helpshift d37cde0
Add release notes for unreal 10.5.0
jaydeep-helpshift 3d77c0f
Add unreal iOS 10.5.0 impact analysis
jaydeep-helpshift fb6d6bd
Add download button for unreal plugin in release notes
jaydeep-helpshift File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||||||
| 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 | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| 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. | ||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.