我需要实现用于将通知推送到 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/