iOS 10.0 * Handle Push notification in foreground

Viewed 1434

If i implement the method to present push notification in ios 10.0

@available(iOS 10.0, *)

    func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)
    {
        completionHandler(UNNotificationPresentationOptions.alert)

    }

then it present all the notification , So, my question is how can i prevent to show particular push notification like (login at another deveice ) i just handle code for that particular push only

2 Answers
Related