Вопрос

Example with Facebook application in iOS, use Apple Push Notification Service (APNS). I think when Facebook server see an new feed or new friend request, it will send a message to APNS. After that, APNS will push notification to client, who is logging in that facebook account. My question is :

  1. Why APNS know which device logging in that facebook account ?
  2. How APNS can send message to that client exactly (why APNS know client's IP address) ?

As I know, Push Notification also a technology use in Windows Phone ( Microsoft Push Notification Service), and Android (Cloud to Device Message).

Thanks.

Это было полезно?

Решение

Well APNS (Apple Push notification Service) works on a per device per app unique ID. You push you message to this unique ID and it get deliver on the users device.

Your app must request this ID and pass it to the server wich will send out the notifications. The ID is that create by the APNS API, thus Apple knows that the ID belongs to that device and app. I guess that the windows and android will work in the same way.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top