Closed Dozorov closed 5 years ago
Hi, Pusher Notifications working with new UNUserNotificationCenter? Thx.
I triying to handle DATA when App in Background.
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { self.pushNotifications.handleNotification(userInfo: userInfo) let content = userInfo if let aps = content["aps"] as? [String: AnyObject] { let requestId = aps["rid"] let companyName = aps["cna"] let request = ["request_id": requestId, "company_name": companyName] NotificationCenter.default.post(name: Notification.Name("RequestForAlwaysTrackingLocation"), object: nil, userInfo: request as [AnyHashable : Any]) } }
It works only when app in foreground....
Hi, Pusher Notifications working with new UNUserNotificationCenter? Thx.
I triying to handle DATA when App in Background.
It works only when app in foreground....