复制苹果的APNS推送通知? [英] Duplicate Apple APNS push notifications?

查看:210
本文介绍了复制苹果的APNS推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们一直在使用我们的应用程序APNS没有太多的事件有一段时间了,突然间我们的用户也报告接收相同的推送通知多次。

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.

我已经证实了 - 乏味 - 我们的服务器只发送通知的有效载荷苹果一次,但通知生产2和3,有时警报相同,无论是在旗帜和通知中心

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.

这两个的iOS5和iOS6的被观察到。

This has been observed in both iOS5 and iOS6.

有没有人见过这个现象?我在或许丢失了一些机会,一个唯一的标识符添加到将prevent苹果发送重复的通知给设备的有效载荷?谷歌的C2DM有collapse_key的这一类的事情,但我找不到任何参考APNS类似的功能。

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.

推荐答案

您能复制这个问题?你应该尝试并添加标识符的通知,如果它不是一个生产服务器。还要检查,如果用户没有在数据库中多发的登录。对于如。与Twitter,Facebook和密码等,并都具有相同的设备令牌。

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.

也有类似的问题了一段时间回来,深挖洞,我发现,这些用户不得不最终版本旁边在手机上测试版的iOS固件的多个版本,这是造成苹果服务器相同的通知发送到同一个设备ID多发时期。

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.

这篇关于复制苹果的APNS推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆