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

I'm updated my react native version to 0.73.4 and getInitialNotification() and onNotificationOpenedApp() does not work in iOS #1018

Open
DeepakSharma04 opened this issue Apr 1, 2024 · 5 comments

Comments

@DeepakSharma04
Copy link

I have updated my React Native version to 0.73.4. In Android, notifications are working fine in the foreground, background, and quiet states.
In iOS, foreground notifications are working, and when the user clicks on them, they navigate to the respective screen.

However, in the background and quiet states, notifications are coming through, but when the user clicks on them, neither getInitialNotification() nor onNotificationOpenedApp() is called, and no remoteMessage is received.

But with "@notifee/react-native": "5.7.0", , getInitialNotification() and onNotificationOpenedApp() are working.

package.json

 "react": "18.2.0",
 "react-native": "0.73.4",
 "@notifee/react-native": "^7.8.2",
 "@react-native-firebase/app": "^19.1.1",
 "@react-native-firebase/messaging": "^19.1.1",
@kesha-antonov
Copy link

Same here
Can't get initial notification on press

@DeepakSharma04
Copy link
Author

Same here Can't get initial notification on press

check the release note of version 7.0.0 and i installed version "@notifee/react-native": "5.7.0",

@kesha-antonov
Copy link

Same here Can't get initial notification on press

check the release note of version 7.0.0 and i installed version "@notifee/react-native": "5.7.0",

I've tried it - didn't help

@vasylnahuliak
Copy link

vasylnahuliak commented Apr 22, 2024

Unfortunately, it's expected behavior https://github.com/invertase/notifee/blob/main/docs-react-native/react-native/docs/release-notes.md#700

getInitialNotification is deprecated on iOS in favour of the PRESS event received by the onForegroundEvent event handler
https://notifee.app/react-native/docs/events#app-open-events

@psdewar2
Copy link

psdewar2 commented May 8, 2024

@DeepakSharma04 separately, does triggering EventType.DISMISSED for onForegroundEvent() work for you when swiping up on the notification?

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

4 participants