ios icon indicating copy to clipboard operation
ios copied to clipboard

fix: support userInteraction for didReceiveRemoteNotification

Open bang9 opened this issue 1 year ago • 1 comments

No matter which type of push notification (local or remote) is clicked, I expected the recommended API, didReceiveNotificationResponse, to work. However, it's not functioning as expected some environment.(maybe firebase integration problem?)

When didReceiveNotificationResponse doesn't work, didReceiveRemoteNotification works even when the notification is clicked. 🤔 Following the guide, I tried to implement it, but userInteraction isn't always present.

Although it's a very hacky, the point of clicking in the background and opening the status bar to click on the push banner is considered an inactive state. So, it works using this approach.

If there's a better way, please let me know. A video is attached for reference.

https://github.com/react-native-push-notification/ios/assets/26326015/714d33d1-e886-4fe4-9206-92dbfcefeba2

bang9 avatar Mar 15 '24 15:03 bang9

For those searching for the answer: The issue with didReceiveNotificationResponse not working was a bug in Notifee https://github.com/invertase/notifee/issues/925

bang9 avatar Mar 16 '24 03:03 bang9