How Push Notifications Arrive on Your Phone?

The commonplace notifications on our iPhone/Android devices follow an interesting journey.

What is a Push Notification?

A push notification is a message sent to a user. The message is sent even if the app is not in use or the device is offline.

Who Sends the Message?

The app is controlled from a provider service e.g. sends you a notification if your pictures are liked. But how exactly 500px server knows your device?
It doesn’t. I am explaining the flow with Apple and the iPhone. Android has a similar flow.

Work Flow

Assuming the app has push notifications and the user has enabled them for the app. after installing an app and logging in, the app requests Apple Push Notification Service (APNS) for a globally unique device token. The token is the unique key for all notifications for the given app and device.

The token is sent to the app’s server ( and the server stores them. Now, when the server wants to send a push notification to a user device, it creates message payload and sends the request along with the device token to APNS.


The APNS then sends the notification to the device.

Push Notifications with APNS

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: