iOS开发资源:推送通知相关开源项目--PushSharp、APNS-PHP以及Pyapns等
“ ”
PushSharp (github)
PushSharp是一个实现了由服务器端向移动客户端推送消息的开源C#库,支持 iOS (iPhone/iPad APNS)、 Android (C2DM/GCM - Google Cloud Message)、Windows Phone、Windows 8、Blackberry (BIS and BES via PAP)以及Amazon (ADM)设备,未来还将支持Firefox OS。
![](http://www.cocoachina.com/cms/uploads/allimg/130608/4196_130608153233_1.png)
PushSharp的API可以流畅地位不同平台创建消息,自适应消息频道,兼容ono框架等。
APNS-PHP (code.google.com)
推送通知(也被叫做远程通知)是在iOS 3.0以后被引入的功能,简称Apple Push Notification Service(APNS)。是当程序没有启动或不在前台运行时,告诉用户有新消息的一种途径,是从外部服务器发送到应用程序上的。
现在可以使用PHP去实现这个功能了,ApnsPHP项目提供了这个功能,该项目源码于2010年2月开放,2012年10月移至github。
https://github.com/duccio/ApnsPHP
![](http://www.cocoachina.com/cms/uploads/allimg/130608/4196_130608153303_1.jpg)
功能:
Autoload system, explicitly include only Autoload.php and all classes are loaded on-demand.
Message class, to build a notification payload.
Push class, to push one or more messages to Apple Push Notification service.
Feedback class, to query the Apple Feedback service to get the list of broken device tokens.
Push Server class, to create a Push Server with one or more (forked) processes reading from a common message queue.
Log class/interface, to log to standard output or for custom logging purpose.
Objective-C Demo Project with not-running, running in foreground and running in background application state support.
Rack::Push Notification (github)
Rack::Push Notification由Matt Thompson开发,Matt Thompson有好几个比较受欢迎的开源项目,其中一个就是大受欢迎的AFNetworking项目。
Rack::Push Notification使用的是Rack Ruby web service interface,可以让你清楚注册设备,从而推送消息。
Node-APN(github)
Node-APN是一个开放的结合了苹果推送通知的
Node.js模块,该源码模块使用简单,反馈服务支持、错误处理,在发送出错时自动重发。遵从苹果的最佳实践。
Pyapns
(github)
Pyapns 提供了通用的Apple Push Notification Service (APNS)。该解决方案使用了开源的Twisted server,支持原生的Pyhon和Ruby API。
功能:
XML-RPC Based, works with any client in any language
Native Python API with Django and Pylons support
Native Ruby API with Rails/Rack support
Scalable, fast and easy to distribute behind a proxy
Based on Twisted
Multi-application and dual environment support
Simplified feedback interface
暂且选取了部分开源项目,
如果你使用过不错的推送通知相关项目,欢迎补充!!