时间:2021-07-01 10:21:17 帮助过:6人阅读
苹果官方文档:http://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9
标准URI
PEAR的优势:一键安装到php/lib/php目录,require即可使用,很方便。
PHP PEAR上有一个Services_Apns,github上有一个Services_APNS,但都无法使用,所以我开发了一个,安装步骤如下:
pear channel-discover sinkcup.github.io/ 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->?>
输出:
()
我的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...