Closed nqam1904 closed 7 months ago
No one cares about me :<
Seems to be caused by calling completion
. I just commented it out to get by for now.
Any updates on this? I am facing this issue as well.
Any update on this, I am also facing this issue.
Also have issue with. completion handler seems to crash app when i receive a notification in foreground. iOS is setup according to documentation.
it used to work.
package.json
"react-native": "^0.73.2",
"react-native-notifications": "^5.1.0",
I am using react navigation as well. code example (pretty much the same as documentation) inside my main component which is several layers deep inside stack navigators and a navigationcontainer:
Notifications.registerRemoteNotifications();
Notifications.events().registerNotificationReceivedForeground((notification, completion) => {
console.log(`Notification received in foreground: ${notification.title} : ${notification.body}`);
completion({
alert: true,
sound: true,
badge: false
});
});
Notifications.events().registerNotificationOpened((notification, completion) => {
console.log(`Notification opened: ${notification.payload}`);
completion();
});
Edit the completion handler is undefined
I have successfully fixed it because I initialized twice in React Native, so it caused an error. But I switched to using
react-native-push-notification
, which is stable and resolves the issue I was facing. Thank you, everyone, for your attention. I request to close the issue here.
Hello! I am experiencing an issue when receiving notifications on an iPhone device with iOS 14 or 15. When I push a real device into the background, I encounter the issue as shown in the image. After building the app on TestFlight, if the app is in the foreground and a notification arrives, it crashes the app in the foreground. On Android 13, it doesn't show in the foreground on all devices. Can you please assist me with this issue?
"react-native-notifications": "^5.1.0", "react-native": "^0.69.6",