Closed sandropoluan closed 3 years ago
@sandropoluan - I'm experiencing the same problem, have you been able to resolve this by any chance?
I have also facing same problem. what is solution?
Same problem here
After spending 3 days on this, in my case turns out the APN notification generated by the backend was missing the property "content-available": 1
. once I added that to the "aps" object, onNotification started to fire! here is an example notification structure (from the apple docs):
{
"aps" : {
"content-available" : 1
},
"acme1" : "bar",
"acme2" : 42
}
same problem here. @izzisolomon I want to try your solution but where did you write that code? I use local notification from pure react-native module.
@Cody1009 if you trigger the notifications locally you don't really need onNotification to fire, do you? I mean you can just call whatever you want at the same time you trigger the notification
@izzisolomon What if I schedule local notification and want to check the user came from the notification or not?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
Everything is doing fine on Android and IOS. Except when on IOS and receiving and then clicking the notification when app on foreground, the onNotification callback is not working. But when I received and clicking the notification while the app is killed or not running, the app is starting up and then the onNotification callback work perfectly.
I use
PushNotification.localNotificationSchedule
.Any idea what is going on?