简体   繁体   English

设备如何接收推送通知? -iPhone SDK

[英]How device receives push notification? - iphone sdk

I want to ask you guys How device receives push notification? 我想问你们,设备如何接收推送通知? Is our device continuously connected to apple's server? 我们的设备是否一直连接到Apple的服务器?

Many Thanks, 非常感谢,
Nav 导航

Device does not remain connected. 设备未保持连接状态。 In fact the app might not even be running any more. 实际上,该应用甚至可能不再运行。

The mechanism is as follows: 机制如下:

  1. Your application has to register for notifications. 您的应用程序必须注册以获取通知。
  2. When it registers you get a token, which you send to your server. 当它注册时,您将获得一个令牌,该令牌将发送到您的服务器。
  3. When you wish to send a push notification, your server connects to Apple server and sends a message to the previously registered token. 当您希望发送推送通知时,您的服务器将连接到Apple服务器,并向先前注册的令牌发送消息。

Simple :) 简单:)

For more details see: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9 有关更多详细信息,请参见: http : //developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9

在此链接中,您可以了解推送通知服务的工作方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM