iOS: Push notifications are shown when in foreground #817
Description
On iOS Push notifications are shown although the app is in foreground. This bug was introduced in the commit 06a8b2d.
As per Apple developer documentation: https://developer.apple.com/documentation/usernotifications/unusernotificationcenterdelegate
func userNotificationCenter(UNUserNotificationCenter, willPresent: UNNotification, withCompletionHandler: (UNNotificationPresentationOptions) -> Void)
Asks the delegate how to handle a notification that arrived while the app was running in the foreground.
So the completion handler should be called with completionHandler(UNNotificationPresentationOptionNone);
, which doesn't show the Push notification anymore when the app is in foreground.
I think the default behavior of this plugin should be not to show Push notification when in foreground.