-
-
Save GxocT/1ec636a25d92b8ad0fcf267d30c736be to your computer and use it in GitHub Desktop.
This file contains 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
func didReceive(_ response: UNNotificationResponse, completionHandler completion: @escaping (UNNotificationContentExtensionResponseOption) -> Void) { | |
switch response.actionIdentifier { | |
case "like-action": | |
let actions = [ | |
UNNotificationAction(identifier: "1-star", title: "★", options: []), | |
UNNotificationAction(identifier: "2-star", title: "★ ★", options: []), | |
UNNotificationAction(identifier: "3-star", title: "★ ★ ★", options: []), | |
] | |
extensionContext?.notificationActions = actions | |
case "open-app": | |
openApp() | |
default: | |
dismissNotification() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment