苹果推送通知服务使用总结
1. 在 Mac 上从 KeyChain Access 程序生成一个密钥对和签名请求
2. APPLE开发者中心,进入"Identifiers" - "App IDs", 注册App ID,注意在App Services中勾选Push Notifications,表示该APP需要使用推送通知服务
3. 进入“Certificates” - "Development",新增一个证书, 选择"Apple Push Notification service SSL (Sandbox)",根据实际情况选择,生产环境时需要重新生成证书
4. 进入"Provisioning Profiles" - "Development", 针对已注册的APP ID生成对应的Provisioning Profiles
5. 以上生成的各种证书下载到本地安装,然后在Key Chain中导出为2个文件,一个".p12",一个“.cer”
6. 在终端输入以下命令来生成公钥和私钥的pem
$ openssl x509 -in cert.cer -inform DER -outform PEM -out cert.pem
$ openssl pkcs12 -in key.p12 -out key.pem -nodes
7. 将生成的两个pem合成为一个,在终端执行
$ cat cert.pem key.pem > ck.pem
8. 然后用php文件测试
"未找到应用程序的“aps-environment”的权利字符串""
出现这个错误是因为APP的证书不对,可能用的还是开发者证书,而应该使用的是含有Push Notification服务的新注册的证书
如果测试的PHP文件报错,记得检查".pem"文件的位置和文件名称是否跟php文件内的一致
"ck.pem"
参考资料:
http://www.ibm.com/developerworks/cn/mobile/mo-ios-push/
http://www.ityran.com/archives/194 Part1
http://www.ityran.com/archives/281 Part2
http://www.ityran.com/archives/240 Part3
http://saeapns.sinaapp.com/doc.html
分享到:
相关推荐
Apple Push Notification Service简介
围绕 Apple Push Notification Service 和 Google Cloud Messaging Service 的简单 HTTP 包装器 安装 安装 Node.js(0.10.x,不是 0.11.x) 安装Redis 克隆源 运行npm install 运行 Pushlet $ 节点pushlet.js ...
用于与Apple Push Notification Service(APN)交互的Python库 安装 从GitHub下载源代码或使用easy_install: $ easy_install apns 样品用法 import time from apns import APNs , Frame , Payload apns = APNs ( ...
这是一个用于与Apple Push Notification Service(APNS)进行交互的小型C ++ 11项目。 您可以将推送通知发送到iOS设备或Safari浏览器(仅适用于OS X 10.9)。 它还处理反馈服务。 安装 首先在global.hpp中设置证书...
Erlang库,用于使用Apple Push Notification Service。 。 。 。 如何使用 在您的rebar.config中设置依赖项: {deps, [ {dp_push, ".*", {git, "https://github.com/yzh44yzh/dp-push.git", "v1.0"}} ]}. ...
apns Go程序包可与Apple Push Notification Service交互特征该库实现了一些我们在其他任何一个库中都找不到的功能: 客户端寿命长-Apple的文档说,您应该保持而不是为每个有效负载创建新的连接新协议的使用-Apple...
PyAPNs2 用于通过HTTP / 2协议与Apple Push Notification Service(APN)进行交互的Python库安装从GitHub下载源代码或使用pip: $ pip install apns2样品用法 from apns2 . client import APNsClientfrom apns2 . ...
无间隙具有连接池的独立Apple Push Notification Service 该软件包内置到一个独立的应用程序中,该应用程序侦听服务器(使用软件包)以推送任何消息。 Gapless使用池来与Apple推送通知服务器建立多个连接。 这样可以...
一个bash脚本,通过Apple push Notification service (APNs)发送iOS推送通知- tsif/pu.sh-源码
推杆OS X和iOS应用程序和框架可与Apple Push Notification Service(APN)一起使用安装使用安装Mac应用程序: brew cask install pusher 或下载最新的Pusher.app二进制文件:另外,您可以使用将包括: pod 'NWPusher...
n Apple推送通知服务(APN)的调试应用程序。特征轻松地将推送通知发送到APNS(Apple推送通知服务)(根本不需要配置) 加载/保存文档,包括令牌和JSON负载直接从钥匙串中获取证书自动获取设备令牌; 无需再通过日志...
Apple Push Notification Service
使用带有JSON Web令牌的新HTTP / 2协议连接到Apple的Push Notification Service的节点客户端。 创建客户 使用签名密钥创建一个APNS客户端: const { APNS } = require ( 'apns2' ) const client = new APNS ( { ...
使用Tokio和异步发送的用于Rust的HTTP / 2 Apple Push Notification Service。 需要帮助 主要作者目前没有任何Apple手机,因此很高兴能与合作者一起获得所需设备和Apple开发人员帐户的帮助。 如果您碰巧有他们并愿意...
对于iOS,正在使用Apple Push Notification(APN)和对于Android,则使用Google Cloud Messaging(GCM)。如何执行(iOS)? 将push_notification.sql转储到数据库中。 更新webservice / index.php第12行中的数据库...
介绍我正在开发应用程序,需要将通知发送到iOS设备。 在过去的一年中,我使用了 ,我认为它比其他库(例如JavaPNS等)要好得多。 但是仍然存在一些问题。 例如,有时会引发异常:java.lang.StackOverflowError。...
APNS 是Apple Push Notification Service(Apple Push服务器)的缩写,下文统一使用该缩写。 因 此,整个过程可以分为三个阶段,下面用大家常用的聊天客户端BeejiveIM来说明。(BeejiveIM是一款支持多账户登录的...
Rpush - Ruby的推送通知服务支持Apple Push Notification Service, Google Cloud Messaging, Amazon Device Messaging and Windows Phone Push Notification Service。
Apple Push Notification Service 苹果推送服务
苹果APNS推送,C#实现通过APNS向客户手机推送消息,Apple Push Notification Service