OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
616 stars 213 forks source link

[Bug]: Urgent When App is background IOS Native didReceiveRemoteNotification/didReceive not working #909

Open GoharFlutter322 opened 3 months ago

GoharFlutter322 commented 3 months ago

What happened?

1)Uncheck the copy and uninstall toggle in build phase for Embedded Foundation Extension 2)Enable background modes -> Remote Notifications.

When app is in background following events are not working override func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {}

override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {}

Steps to reproduce?

1)Uncheck the copy and uninstall toggle in build phase for Embedded Foundation Extension
2)Enable background modes -> Remote Notifications.

When app is in background following events are not working 
    override func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {}

    override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {}

What did you expect to happen?

1)Uncheck the copy and uninstall toggle in build phase for Embedded Foundation Extension 2)Enable background modes -> Remote Notifications.

When app is in background following events are not working override func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {}

override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {}

OneSignal Flutter SDK version

it was working in 3.4.1 but in it's not working after 5.1.6

Which platform(s) are affected?

Relevant log output

No response

Code of Conduct