iPhone push notifications completely stopped + solution (finally)
My wife's iPhone12 push notifications completely stopped working. This means, no push notifications at all for any app- Gmail, Whatsapp, Messenger etc'. For example, when the sender sends a message, they would see only one Check mark in the app, meaning it reached the server, but not the recipients phone.
I searched online and saw many posts describing the same problem (such as this, this, this) but all without solutions or obvious steps such as checking your notification settings, focus mode, and some even suggest to reset phone settings.
Since I'm a mobile developer and have some technical understanding with APNS (Apple Push Notification Service) I went pretty deep with my attempts to fix it until the problem was solved (cause otherwise I would spend hours with Apple customer support and might not get a good answer).
I'm sharing these steps for future users that hit this problem, and perhaps for Apple engineers to pick on that hard to repro and debug problem.
How it started?
- We flew abroad, and my wife connected to the Airplane's wifi network
- When we landed in a different country, from that point the push notifications stopped all together.
What I tried?
- Check the notification settings of the iPhone and toggle it on/off.
- Check the focus/do-not-disturb mode of the iPhone and toggle it on/off.
- Reboot iPhone
- Install latest OS update (iOS 17.2.1)
- Reset all network settings on the iPhone
The next steps are more risky for your data, so before continuing you would have to back up your iPhone to iCloud. That includes everything, such as photos, docs, contacts and even your Whatsapp chat history. Note that is can take several hours.
6. Reset all your iPhone settings.
7. Logout of your Apple Id / login again.
8. Factory reset your iPhone <-- this is a very lengthy step as you'd need to recover your iPhone data from iCloud which can again take several hours, depending on your backup size.
At this point nothing still worked. Push notification still didn't get through! That lead me to think that the problem might not be with the iPhone state, but with the Apple user itself.
9. Logout of your user Apple Id.
10. Login with a different Apple Id (your friend/spouse)
11. Go again to your Messenger/Whatsapp app, now you WILL receive notifications
12. Logout and login again with your original Apple Id. Problem solved!
Conclusion- you can try steps #9-#12 before factory resetting your iPhone all together.
Technical thoughts
Most likely the trigger to this state was either the connection to the airplane wifi, or landing in a new country. This must have triggered a bad / non-recoverable state on APNS.
Given all push notifications stopped completely when apps are killed (swiped away by the user), it feels like APNS failed to reach the iPhone from some reason. Note that if the app is in the foreground, or you backgrounded it just for a few seconds, you might still get push notifications as the app is still not "suspended" and the push is getting from a different network path and not APNS. The app only gets suspended after a few seconds, or when you swipe it away (which moves it to killed state).
In a high level, APNS probably holds a table of device ids and user ids it tries to send push notifications to. I'm afraid that our user was somehow in bad state with regards to our iPhone Id, and even step #7 didn't help recover this state (which is a bad bug of its on).
Therefore, what probably triggered the proper cleanup step in APNS was associating this iPhone ID with a new Apple ID, which unjammed the bad state.
I hope this help folks that run into this again!