问题
I'm having a very strange behavior in my push notification service. I'm testing a new application in 20 devices but I have 3 devices that doesn't receive any push notification.
I have my own server here a manage the push subscription, and in this service I have the tokens of these devices. But the strange thing, is that I use the same service to send push notification to other applications that I built, and it works perfectly fine.
And I also can assure you that these devices have the push notification settings enable to this application.
I'm without any ideas what the problem can be.
I already generate a new push certificate for these application, I place debug in my server to ensure that the push notification is successfully sent to apple. But if the same application receives push notifications in other devices, why it doesn't work with these specific devices.
Every ideas are welcome. Thank you.
回答1:
As you're specific about the three devices, it sounds a little odd and Bogdan Andresyuk idea of reseting those devices would make sense.
I've had issues in the past whereby some push notifications are not delivered. Can I ask are you sending notifications outin order i.e. are these three devices the last three devices that you try and send notifications too? or is there a sequence or some sort of pattern that you can build. Say you have 10 devices and three don't get the notification and the notifications are sent in order and it's device 3, 6 and 9 that don't get the messages.
If there is something like this then it could well be your push notifications are being rejected by Apple. Perhaps because you're opening and closing a socket to the APNS to many times in quick succession. Apple doesn't like this and prefers you hold the socket open why you send your notifications.
If not then perhaps you could provide a little more detail about the devices and the sequence of events and how you're set up your push service. I use urban airship as the take care of the sockets etc for you and you can send 1 million for free.
回答2:
There are few points that you can look at in Apple's Troubleshooting Push Notification.
I would start reading from Registration Succeeded But No Notifications Received, you may get some clues.
回答3:
Similar to your comment, we had development tokens mixed in with production tokens. After the first notification was sent to a dev token, all of the subsequent notifications failed (and silently, unless I missed something obvious).
回答4:
Try to do Settings -> General -> Reset -> Reset Network Settings
Then re-enable(turn on/off) notification service for your application.
Maybe try to reboot devices
来源:https://stackoverflow.com/questions/11758496/push-notifications-arent-send-to-some-devices