: .
iPhoctionary
*)launchOptions
{
=
;
[ makeKeyAndVisible];
//
Let the device know we want to receive push
notifications
[[UIApplication sharedApplication]
registerForRemoteNotificationTypes:
UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)];
return
YES;
}
通过 registerForRemoteNotificationTypes 方法,告诉应用程序,能接受 push 来的通知。 : .
iPhone 消息推送机制实现与探讨
Push 的原理:
Push 的工作机制可以简单的概括为下图
图中,Provider 是指某个 iPhone 软件的 Push 服务器, 作为 Provider。
APNS 是 Apple Push Notification Service(Apple Push 服务器)的缩写,是苹果的服务器。
上图可以分为三个阶段。
第一阶段:.net 应用程序把要发送的消息、目的 iPhone 的标识打包,发给 APNS。
第二阶段:APNS 在自身的已注册 Push 服务的 iPhone 列表中,查找有相应标识的 iPhone,并把
消息发到 iPhone。
第三阶段:iPhone 把发来的消息传递给相应的应用程序, 并且按照设定弹出 Push 通知。 : .
iPhone 消息推送机制实现与探讨
Push 的原理:
Push 的工作机制可以简单的概括为下图
图中,Provider 是指某个 iPhone 软件的 Push 服务器, 作为 Provider。
APNS 是 Apple Push Notification Service(Apple Push 服务器)的缩写,是苹果的服务器。
上图可以分为三个阶段。
第一阶段:.net 应用程序把要发送的消息、目的 iPhone 的标识打包,发给 APNS。
第二阶段:APNS 在自身的已注册 Push 服务的 iPhone 列表中,查找有相应标识的
iphone消息推送机制实现与探讨 来自淘豆网www.taodocs.com转载请标明出处.