wix / react-native-notifications

React Native Notifications
MIT License
3.23k stars 762 forks source link

registerNotificationReceivedBackground not triggered if app not running - iOS #834

Closed Fredkr closed 2 years ago

Fredkr commented 2 years ago

Hi,

receivedBackground (& receivedForeground) works fine when app is in foreground. Or in background & still alive. But nothing is triggered when the app is killed.

Is this at all supported?

plattform: iOs version: 15.3.1 & 15.4.x

DanielEliraz commented 2 years ago

@Fredkr I will add to docs that it works only when you send background APN as stated in apple docs:

{
   "aps" : {
      "content-available" : 1
   },
   "acme1" : "bar",
   "acme2" : 42
}
Fredkr commented 2 years ago

@DanielEliraz Thanks, but this doesn't answer my question though.

But after getting some more understanding of the iOS push notifications i believe it's not att all supported on an OS level to receive silent notifications if the app is not running (killed by user etc)? So nothing related to this lib.

DanielEliraz commented 2 years ago

Should be added it to the docs as well. @Fredkr PR is welcomed of course 💟