How do iOS Push Notifications work?

How do iOS "push" notifications get delivered to a particular device without that device needing to poll a server?

For example, let's say I have received a new message on Facebook. Facebook notifies Apple that my device should receive a notification as such. But how does Apple know which device/IP to push the message to?


It was too much for me to put in a comment so.

From the documentation.

Apple Push Notification service (APNs) propagates push notifications to devices having applications registered to receive those notifications. Each device establishes an accredited and encrypted IP connection with the service and receives notifications over this persistent connection. Providers connect with APNs through a persistent and secure channel while monitoring incoming data intended for their client applications. When new data for an application arrives, the provider prepares and sends a notification through the channel to APNs, which pushes the notification to the target device..

I suggest reading the documentation for more information and how to use and configure. It's all there.

Push Notifications


Each device can be updated with data using their own unique device tokens. This picture explains everything . .

在这里输入图像描述


I created an infographic to explain the workflow of push notifications. Hope this is helpful.

在这里输入图像描述

链接地址: http://www.djcxy.com/p/62612.html

上一篇: 我们可以向iOS设备发送推送通知给APN吗?

下一篇: iOS推送通知如何工作?