Apple Push Notification - all messages get sent but not all get delivered

3.8k Views Asked by At

I have a problem with sending Apple Push Notifications.

When I send a message to two devices only, everything is working. But When I send a message to all devices in the Database, then not all Push Message get delivered, but I get no error for any device. Sending was ok!

And one of the devices which gets a message in the first test, didn't get a message, when I post the message to all devices.

The send procedure is working, because I get a message on my phone at the first test and when I send to all devices it works too. Can there be any other problem which cause this problem?? Or is this a Apple bug/problem.

I have no idea what the problem could be. Does anyone have this problem too??

3

There are 3 best solutions below

0
On

If you are sending same message many time with in a certain time from a same device token, then last message will be send, I think apple remove duplicate records in backend.

0
On
  1. APNS is based on Apple Servers, and Apple doesn't give any guarantee on successful message delivery.
  2. If the app is open (i.e. the user is using the app) while the notification arrives, iOS doesnt show a notification message, you need to handle it.
  3. Notification shows up only when the app is backgrounded or killed.
  4. Also implement feedback service on your server side; will help you get rid of old unwanted tokens(users who deleted the app or disabled notifications thru settings).
  5. Dont send too many notifications to a device within a short span of time, coz APNS caches only 1 message/device (if the device is offline). So it can deliver the message when the device comes online. Am not sure how long the message is cached though.
  6. Check your certificates that use in other devices.
1
On

When you were working for 1 device, I guess you were using development profile. And for multiple device, you must be using distribution profile. So just check all your provisioning profiles and registered devices according to provisioning profile. Delete the profile which you are not using and that should solve your problem.