Skip to content

Commit

Permalink
RDGMS-844 <upd instruction>
Browse files Browse the repository at this point in the history
  • Loading branch information
o.korniienko authored and o.korniienko committed Jan 25, 2023
1 parent edbb19c commit c345dcf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Binary file not shown.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To open your project run $ open ProjectName.xcworkspace<br>
More about Cocoapods and Podfile here - https://cocoapods.org, https://guides.cocoapods.org/using/the-podfile.html and https://guides.cocoapods.org/using/using-cocoapods.html.

### Add sdk to your project.
Last actual SDK version: 1.1.3<br>
Last actual SDK version: 1.1.4<br>
To integrate PushSDK to your project with COCOAPODS (https://guides.cocoapods.org/using/the-podfile.html) add the next line in Podfile.<br>
pod 'PushSDK', :git => 'https://github.com/GlobalMessageServices/BCS-GMS-SDK-IOS', :branch => 'main'

Expand Down Expand Up @@ -198,6 +198,30 @@ pushAdapterSdk.areNotificationsEnabled { (notificationStatus) in
```
***

## Using reply button in notification
### The reply button empowers end users to make a response to the push message directly from notification.
### You can catch user's response and process it by using followed code (in an extension of ViewController/AppDelegate:UNUserNotificationCenterDelegate)
```swift
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {

let userInfo = response.notification.request.content.userInfo

switch response.actionIdentifier{

***

case "pushKReplyActionId":
if let reply = (response as? UNTextInputNotificationResponse)?.userText{
PushKConstants.logger.debug("user response: \(reply)")
}

default:
break
}

completionHandler()
}
```

# SDK functions description

Expand Down

0 comments on commit c345dcf

Please sign in to comment.