When the app running in background receiving a push, causes the notification to show in notification center on my iphone. Clicking it causes the app to open, and the push.on(‘notification’) handler code is run.
When the app is running in foreground the push.on(‘notification’) handler code is not run. The only thing i see in xcode log is didReceiveNotification with fetchCompletionHandler
Is there anyone who has seen the same thing, and knows any way to get the on(‘notification’) code to run also in foreground?
EDIT: It works as it should on Android, but not on iOS
I’m still just getting the didReceiveNotification with fetchCompletionHandler when receiving push notifications when the app is in foreground. Did not help to upgrade to version 2.3.0 of the plugin. I also tried the 2.2.3, no go with that version either, sadly.
I was getting the same error but version 2.2.3 worked for me. My iOS platform is 5.0.0 try removing and adding it again.
Also my pod is => pod ‘FirebaseMessaging’, ‘~> 2.0.0’
Which iOS version are you on? Because @2.2.3 does not work on my iOS 13, because the device token is an object, instead of a string as expected. In version 2.3.0 this is fixed, but i still get the didReceiveNotification with fetchCompletionHandler message when the app is in foreground.