Duplicate Apple APNS push notifications?

混江龙づ霸主 提交于 2019-12-20 10:22:44

问题


We've been using APNS on our app without much incident for some time now, and suddenly our users are reporting receiving the same push notification multiple times.

I've confirmed - tediously - that our servers are only sending the notification payloads to Apple once, and yet the notification produces 2 and sometimes 3 identical alerts, both in the banner and notification center.

This has been observed in both iOS5 and iOS6.

Has anybody seen this phenomenon before? Am I perhaps missing some opportunity to add a unique identifier to the payload that will prevent Apple from sending duplicate notifications to the device? Google's C2DM has collapse_key for this sort of thing, but I can find no reference to a similar functionality in APNS.


回答1:


Are you able to replicate this issue? You should try and add identifiers to notification if it's not a productions server. Also check if user doesn't have mutiple logins in your database. For eg. With twitter, Facebook and password etc and all have same device token.

Had a similar issue some time back and digging deep I found that these users had multiple editions of beta iOS firmware on their phone beside final version and this was causing apple servers to send same notification to Same device ID mutiple times.

Some blogs have instructions for consumers out there and very litte we could do.



来源:https://stackoverflow.com/questions/12866600/duplicate-apple-apns-push-notifications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!