Created
March 26, 2018 18:35
-
-
Save 3257/9144a15121de3d58d1906e04eeda5bf9 to your computer and use it in GitHub Desktop.
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
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { | |
if let apnsData = response.notification.request.content.userInfo["aps"] as? [String: Any] { | |
if let googleURL = apnsData["googleURL"] as? String { | |
UIApplication.shared.openURL(URL(string: googleURL)!) | |
} | |
completionHandler() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment