Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ios): On Notification Tap events not passed to firebase handlers that handles the notifications that opened the app #23

Open
rutvik110 opened this issue Mar 22, 2022 · 4 comments

Comments

@rutvik110
Copy link

Description :

I'm working on adding foreground and background notifications support in one of my apps. I've got firebase and pusher beams added to support notifications.
As of this moment, as pusher beams only has handlers to handle notifications in foreground state with PusherBeams.instance.onMessageReceivedInTheForeground and no support for handling notifications that are opened the app from background or terminated state, so to handle those types of events, I'm using Firebase handler FirebaseMessaging.onMessageOpenedApp.listen to listen to those notifications.

The issue comes when I'm trying to open the app from background/terminated state by tapping on notifications on ios, the firebase handler is never called.

Warning: Application delegate received call to -application:didReceiveRemoteNotification:fetchCompletionHandler: but the completion handler was never called and the following warnings are logged in the console.
Warning: UNUserNotificationCenter delegate received call to -userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: but the completion handler was never called.

In case of android, the handler does gets called properly and I recieve that notification data within the app.

To make sure this wasn't an issue around firebase handlers, I removed all the pusher beams integration and tested the notifications which worked as expected in all app states.
I did a little digging in to the pusher beams ios code for notifications, found out this handler here for handling notification taps.
Screenshot 2022-03-22 at 9 09 07 AM

I see that it's yet to be implemented but I still don't understand the reason why the background notifications are properly passed on to the firebase handlers in the android but on ios it fails to do so. Is pusher beams handling that callback but not passing it to firebase handlers!?
Could really use some help here as this is a critical part of our app!

@benjamin-tang-pusher
Copy link

Unfortunately we won't be able to support handling notifications in the background until it is implemented in the library. I will keep this issue open however, just in case another user is able to come up with a workaround.

@gripep
Copy link

gripep commented Apr 14, 2024

Are you still planning to add this feature? Not having it is a big deal, especially as we're considering moving away from Pusher. Is there a timeline for its implementation?

@fnoceda
Copy link

fnoceda commented Jun 12, 2024

Same here, it is a big problem not to manage this type of events, is there a deadline for its implementation?

@mahmood541996
Copy link

mahmood541996 commented Aug 17, 2024

@rutvik110 Hi Rutvik,
I cloned pusher beams example and noticed that FirebaseMessaging.onMessageOpenedApp doesn't work on Android, but FirebaseMessaging.onBackgroundMessage only works on android.

Can you help me how you get the FirebaseMessaging.onMessageOpenedApp working ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants