APNs

How Mobile Push Notifications Work: iOS & Android
Every day your phone buzzes with news alerts, chat messages, and ride updates — all while the apps responsible for them are closed. But how exactly does a message originating on some remote server find its way to your locked screen in milliseconds? And no, your phone is not constantly asking “got anything for me?” — the answer is far more elegant than that. The Big Question: Does the Phone Poll for Notifications? The short answer is no. Modern mobile operating systems do not repeatedly poll (pull) a server to check for new messages [8]. Instead, both iOS and Android maintain a single, long-lived persistent connection to a centralised gateway run by Apple or Google. When a notification is ready, the gateway pushes it down that open channel to your device [8]. This fundamental push model means: