Pushwoosh / pushwoosh-flutter

Pushwoosh Flutter Plugin
Other
8 stars 16 forks source link

[Bug]: iOS, Foreground Notification is send twice #91

Closed aliakkawi closed 3 weeks ago

aliakkawi commented 1 month ago

Documentation

Description

Hi, we are using FCM along with the Pushwoosh SDK. Before integrating Pushwwosh we used to handle Foreground Alerts using Local Notifications and therefore after implementing Pushwwosh the Notification is sent twice for iOS. We've already tried the following solutions: 1. `Pushwoosh.getInstance.setShowForegroundAlert(false);

  1. In the AppDelegate:
    override func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)
    {
        if UIApplication.shared.applicationState == .active {
            completionHandler([])
        } else {
            completionHandler([.alert, .badge, .sound])
        }
    }

Bug severity

High

Steps to Reproduce

Send FCM Notifications for iOS devices.

Your Pushwoosh Flutter plugin version

2.2.25

flutter package version

3.24.3

Last worked Pushwoosh Flutter plugin version (if any)

No response

Affected platforms

Affected OS versions and/or devices

iOS devices

Workaround

No response

Relevant log output

No response

enginseer-dev commented 3 weeks ago

Hello, @aliakkawi

The double notification bug was related to the bug in the release of iOS 18: https://forums.developer.apple.com/forums/thread/762126

We’ve addressed this in the latest releases of the Flutter plugin.

Thank you for your feedback and for bringing this to our attention!