Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicate Apple APNS push notifications?

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.

like image 817
Remy Gale Avatar asked Oct 12 '12 20:10

Remy Gale


People also ask

Why do I get 2 of the same notifications?

Android devices with 2 copies of the app installed on the device can also receive duplicate notifications. This could happen if you have a production and staging / dev app installed at the same time with different Android package names.

Can you have multiple Apple Push certificates?

Actually you can create only 2 apple push certificates for one App ID and no more. Apple developer center does not allow me to create more then two and same experience has my friend.


1 Answers

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.

like image 62
carbonr Avatar answered Sep 20 '22 08:09

carbonr