0

When I send the notification. I am getting the notification randomly on the devices. I was sending notification to 5 devices. Now 3 devices were receiving the notification and 2 device didn't received.

  • When the app is running in the foreground I am getting notification in all devices.
  • When app is in background I am getting notifications.
  • When app is killed by the user and even phone is locked I didn't receive any notification in couple of devices and received in other device.

Now, when I open the app I immediately received the notification. I read an article from apple doc on silent push notification and there it is clearly mentioned that there is no guarantee of notification delivery to the device.

I cannot use normal notifications because I am filtering data before the notification shown to user. If payload have device id which is equal to stored device id then I fired a local notification if not then notification is silent. Any solution for this issue?

manish
  • 3
  • 4

1 Answers1

-1

You can use UNNotificationServiceExtension which allows modification of a remote notification content before its delivered to the user. Here is the reference link : https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension

MeghaJain
  • 164
  • 1
  • 1
  • 8
  • But I am not getting notification from apple server itself. It is not delivered to the app so how can I use UNNotificationServiceExtension @MeghaJain? – manish May 26 '22 at 11:25