为ApplePush开发的PHPPEAR包:Services_Apple_PushNotification_PHP教程
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了为ApplePush开发的PHPPEAR包:Services_Apple_PushNotification_PHP教程,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1375字,纯文字阅读大概需要2分钟。
内容图文
![为ApplePush开发的PHPPEAR包:Services_Apple_PushNotification_PHP教程](/upload/InfoBanner/zyjiaocheng/172/29154fd342674c13a0a78635648740a3.jpg)
苹果官方文档:http://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9
<span 对于这种第三方库,PHP官方称之为PEAR,需要按照PEAR标准开发(标准URI<span )。
PEAR的优势:一键安装到php/lib/php目录,require即可使用,很方便。
PHP PEAR上有一个Services_Apns,github上有一个Services_APNS,但都无法使用,所以我开发了一个,安装步骤如下:
pear channel-discover sinkcup.github.io/<span pear pear <span install sinkcup/Services_Apple_PushNotification
使用步骤:
1、登录苹果开发者后台,下载dev或prod证书,合并成pem文件。在ios app里添加push权限,获得device token。参考:http://www.cnblogs.com/gpwzw/archive/2012/03/31/Apple_Push_Notification_Services_Tutorial_Part_1-2.html
2、demo(参考)
= => => = new Services_Apple_PushNotification(= = => => => => = $o->?>
输出:
<span bool(<span true)
我的PEAR 频道:http://sinkcup.github.io/pear/
Services_Apple_PushNotification项目代码:https://github.com/sinkcup/Services_Apple_PushNotification
http://www.bkjia.com/PHPjc/440121.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/440121.htmlTechArticleApple Push Notification Service:通过苹果服务器向app用户推送消息,无需启动app。 苹果官方文档:http://developer.apple.com/library/mac/documentation/Netwo...
内容总结
以上是互联网集市为您收集整理的为ApplePush开发的PHPPEAR包:Services_Apple_PushNotification_PHP教程全部内容,希望文章能够帮你解决为ApplePush开发的PHPPEAR包:Services_Apple_PushNotification_PHP教程所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。