我需要实现将通知推送到 iOS 应用程序的服务器端代码。我已经关注了这个链接。
问题是我总是收到“凭据不足”的消息。我正在使用apnagent
节点模块。
有没有人成功尝试过这个?我应该做些什么来设置我的凭据吗?
提前致谢。
我需要实现将通知推送到 iOS 应用程序的服务器端代码。我已经关注了这个链接。
问题是我总是收到“凭据不足”的消息。我正在使用apnagent
节点模块。
有没有人成功尝试过这个?我应该做些什么来设置我的凭据吗?
提前致谢。
是的,我刚刚运行了 apnagent。假设您正确设置了证书和应用程序,我可以使用它:
那是:
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')