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

iOS: Own userNotificationCenter:didRecieveNotificationResponse:withCompletionHandler is overwritten #925

Closed
carlbleick opened this issue Nov 30, 2023 · 3 comments

Comments

@carlbleick
Copy link

My team recently switched to Notifee to show in-app notifications. The app requires special notification handling in certain situations and utilizes custom native code for iOS and Android.

For iOS we use an own implementation for userNotificationCenter:didRecieveNotificationResponse:withCompletionHandler to send async requests after the user pressed a notification action.

Based on previous issues, I understand that Notifee intentionally overwrites this handler (#159, #644).

Currently I set notification categories for iOS and handle pressed actions in native code. While I was able to refactor most of the functionality by using the notifee.onBackgroundEvent(), the listener receives a pressed action significantly slower compared to the native implementation.

I am wondering:
Is there currently any possibility to allow an own native implementation for the handler?

@carlbleick
Copy link
Author

To fix this temporarily, I adjusted the NotifeeCore+UNUserNotificationCenter.m in NotifeeCore to call the original delegate.

For my specific case:
Calling the original delegate (which is RNFBMessaging) will then itself call the original delegate (my own implementation).

[_originalDelegate userNotificationCenter:center
  didReceiveNotificationResponse:response
   withCompletionHandler:completionHandler];

Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@gotcha84
Copy link
Contributor

gotcha84 commented Feb 6, 2024

I'm facing the same issue on iOS when trying to use Notifee and Iterable. The Notifee delegate seems to be overwriting the Iterable delegate.

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

No branches or pull requests

2 participants