Hacker News new | ask | show | jobs
by there 5191 days ago
And when an account is logged out, the app should be calling

   [[UIApplication sharedApplication] unregisterForRemoteNotifications];
which should unregister it from iOS, even if the network connection isn't available, right? If the call makes it back to Apple's servers, future push notifications shouldn't even get to the device, but even if they do, shouldn't iOS see that it's no longer valid for the application and not display it, bouncing it back to Apple's servers so the token will show up on their Feedback server? Unless I'm mistaken, unregistering for notifications will remove the application from the device's Notification Center settings.
1 comments

But the original owner still wants to receive push, so you shouldn't unregister. This isn't apple's problem, this is that the twitter app's server doesn't know they logged out and continues to send messages to the phone.
If you logged out of the application, it should unregister. It should only re-register when you log back in (which would require communication with Twitter's servers, which would update the APNS token to point to the correct account). This is how I handle APNS tokens in my Pushover app.
I think you are missing the point. It is a multi-user app. The first user didn't logout when the second login, both were logged in at the same time.

The _real_ solution is to wait for server acknowledge to delete the account from the phone.