Get push notification while App in foreground iOS
For displaying banner message while app is in foreground, use the following method. iOS 10, Swift 3/4 : // This method will be called when app received push notifications in foreground func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { completionHandler([.alert, .badge, .sound]) } iOS 10, Swift 2.3 : @available(iOS … Read more