Multiple push notifications being received on reinstall

We are testing an ad-hoc build of an app with frequent uninstalls/reinstalls. On each install we register and receive a new push token. However, messages sent from the server to the old tokens (associated with older installs) are being received by the app, resulting in duplicate push notifications presented to the user.

I've tested sending messages to the old tokens via the console and they are accepted without any error (i.e. no invalid device, invalid token errors).

My understanding is UA should have expired these tokens via the feedback service, or APNS should be rejecting them. Any idea why these tokens are still producing notifications after uninstall?


Didn't find what you were looking for?

New post


1 comment

  • Marc,

    Uninstalling and reinstalling the app on the same iOS device does not necessarily mean that the Device Token will change, but that it can change.

    That is, when you uninstall and reinstall, that does not mean that you will get a new Device Token every time. It is entirely possible that that Device Token will remain the same between installs.

    Because of this, Urban Airship created the Urban Airship Channel ID, which keeps track of the latest Device Token issued from Apple. 

    It is recommend that you instead use the Channel ID to send to your devices.

    Not doing so could result in the situation you're seeing here with seemingly "duplicated" messages, when really you're sending to the same device token over again.

    You are right, however, in assuming that if the Device Token is uninstalled, that that Device Token should become inactive, and it does once we receive feedback from APNS. However, if there is no feedback, and that Device Token is active on Apple's side, then it is effectively still a valid device to send to.


Please sign in to leave a comment.