|
|
@ -140,20 +140,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD |
|
|
|
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], |
|
|
|
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { |
|
|
|
|
|
|
|
if userInfo[gcmMessageIDKey] != nil { |
|
|
|
// print("Message ID completionHandler: \(messageID)") |
|
|
|
} |
|
|
|
|
|
|
|
if |
|
|
|
let aps = userInfo["aps"] as? NSDictionary, |
|
|
|
let alert = aps["alert"] as? NSDictionary, |
|
|
|
let _ = alert["body"] as? String, |
|
|
|
let _ = alert["title"] as? String { |
|
|
|
let codeID = userInfo["code"] as? String |
|
|
|
self.redirectWithPushNotification(notificationCode: codeID!) |
|
|
|
} |
|
|
|
// if userInfo[gcmMessageIDKey] != nil { |
|
|
|
//// print("Message ID completionHandler: \(messageID)") |
|
|
|
// } |
|
|
|
// |
|
|
|
// if |
|
|
|
// let aps = userInfo["aps"] as? NSDictionary, |
|
|
|
// let alert = aps["alert"] as? NSDictionary, |
|
|
|
// let _ = alert["body"] as? String, |
|
|
|
// let _ = alert["title"] as? String { |
|
|
|
// let codeID = userInfo["code"] as? String |
|
|
|
// self.redirectWithPushNotification(notificationCode: codeID!) |
|
|
|
// } |
|
|
|
|
|
|
|
completionHandler(UIBackgroundFetchResult.newData) |
|
|
|
// completionHandler(UIBackgroundFetchResult.newData) |
|
|
|
} |
|
|
|
|
|
|
|
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) { |
|
|
|