使用 NodeJS 的 iOS 推送通知 - 凭据

标签 ios node.js push-notification engineyard apnagent

我需要实现用于将通知推送到 iOS 应用程序的服务器端代码。我关注了this link .

问题是我总是收到“凭据不足”消息。我正在使用 apnagent Node 模块。

有人试过成功吗?我还应该做些什么来设置我的凭据吗?

提前致谢。

最佳答案

是的,我刚刚运行了 apnagent。假设您正确设置了证书和应用程序,我可以使用它:

  • certificate.p12 和密码,
  • cert.pem 和 key.pem 文件

即:

agent
    .set('cert file', join(__dirname, '../_cert/apn-dev-cert.pem'))
    .set('key file', join(__dirname, '../_cert/apn-dev-key.pem'))
    //or this works too:
    // .set('pfx file', join(__dirname, '../_cert/Certificates.p12'))
    // .set('passphrase', 'your passphrase')
    .enable('sandbox')

关于使用 NodeJS 的 iOS 推送通知 - 凭据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20455190/

相关文章:

javascript - 无法获得有效的正则表达式以在 Node.js 中工作

ios - 交互式推送通知操作按钮单击不起作用

ios - iOS 设备上的 Rest 服务器使用 Swift

android - 为什么 UDP 收件人两次收到相同的数据包?

ios - UIPageController : Turning the page forward then backward quickly only updates the first page

node.js - ExpressJS 删除连接

node.js - Node v5 破坏了 Webstorm 的调试器

ios - 无法分配给属性 : 'outputs' is a get-only property

ios7.1:推送通知角标(Badge)更新问题

windows - 推送通知、Uri channel 和 Php 服务器端