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

Foreground onNotification behaviour on iOS #2389

Open
abdymm opened this issue Oct 31, 2023 · 2 comments
Open

Foreground onNotification behaviour on iOS #2389

abdymm opened this issue Oct 31, 2023 · 2 comments

Comments

@abdymm
Copy link

abdymm commented Oct 31, 2023

Question

Hi guys, just want to know the correct behavior when the app is in FOREGROUND, on the onNotification currently on Android the onNotification will be triggered when a notification is received and the user taps it, but on iOS its triggered only when the user taps the notification, is this expected behaviour?

@trevor-mobileup
Copy link

We are also experiencing this issue. I understand it's unlikely to see this get fixed/looked into at this point, but I am commenting and getting this activity in the hopes that someone on the library has found a workaround. Migrating is a big ask for our legacy app, and we're hoping for a band-aid solution until then.

@trevor-mobileup
Copy link

trevor-mobileup commented Nov 8, 2023

@abdymm Through other issues we found the following two lines that we added to our AppDelegate.mm:

NSDictionary *userInfo = notification.request.content.userInfo; [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo];

We added these to willPresentNotification like so:

image

Though our issue now is that the userInteraction property doesn't seem to be set properly on the notification object in the onNotification callback. Separate issue though, hope the above helps

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

2 participants