Skip to content

Instantly share code, notes, and snippets.

@brunomunizaf
Created June 7, 2019 01:38
Show Gist options
  • Save brunomunizaf/cedfe5cc6303ce997307431eb15a5443 to your computer and use it in GitHub Desktop.
Save brunomunizaf/cedfe5cc6303ce997307431eb15a5443 to your computer and use it in GitHub Desktop.
Rich media push notifications
// MARK: - UNUserNotificationCenterDelegate
extension AppDelegate: UNUserNotificationCenterDelegate {
func userNotificationCenter(_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void) {
if response.actionIdentifier == "open.action" {
// OPEN DOOR
}
completionHandler()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment