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

registerNotificationOpened isn't working as expected in iOS #1018

Open
bhanuprakash1226 opened this issue Dec 18, 2023 · 1 comment
Open

Comments

@bhanuprakash1226
Copy link

registerNotificationOpened method isn't working as expected in the scenario:
when the app receives a notification in the foreground state and I open the app post killing the app by tapping on a notification.

But the given method is working as expected when the app receives a notification in the killed and background states and opens the app from the killed state by tapping a notification.

Notifications.events().registerNotificationOpened((notification: Notification, completion: () => void, action: NotificationActionResponse) => {
      completion();
});

Using the latest version: 5.1.0
RN version:0.72.5
iOS: 17.1.2

@katwal-dipak
Copy link

Similar issue here. The workaround was using notifee library for iOS

useEffect(() => {
   if (Platform.OS === 'ios') {
    return notifee.onForegroundEvent(({type, detail}) => {
      switch (type) {
        case EventType.PRESS:
          // Handle notification payload
          }
          break;
      }
    });
     }
  }, []);

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