简体   繁体   English

PyAPNS无法在生产环境中将推送消息传递到iOS设备

[英]PyAPNS not delivering push messages to iOS devices in production environment

since yesterday (2013-04-23) we have experienced problems to delivery notifications via APNS' production gateway, despite development works fine. 从昨天(2013-04-23)开始,尽管开发工作正常,但我们在通过APNS的生产网关进行交付通知时遇到了问题。

I haven't made changes in the code that sends the message, so, it's odd to see it just stopped to work. 我尚未更改发送消息的代码,因此,奇怪的是它停止工作了。

This is the payload: 这是有效载荷:

{"driver_pk":"505978566e77c33341000610","booking":{"pk":"5164d705b6c1213479c2fe5b"},"aps":{"sound":"booking_new_offer","alert":{"loc-key":"MSG_NB"}},"creation":"2013-04-24T07:44:28+00:00","type":"new-booking","param":{}}

As you guys can see, the size is 220 (less than 256) and this is a simple ASCII string, with no special chars at all. 大家可以看到,大小为220(小于256),这是一个简单的ASCII字符串,完全没有特殊字符。

Using pyapns library to do the sending job: https://pypi.python.org/pypi/apns in most recent version 1.1.2 (also tried previous like 1.1.1 etc) 使用pyapns库完成发送任务: https ://pypi.python.org/pypi/apns在最新的1.1.2版本中(也尝试过使用1.1.1等)

Any help? 有什么帮助吗?

If it already worked in production, you should check whether your production push certificate has expired, and create a new one if it has. 如果已在生产中使用,则应检查生产推送证书是否已过期,如果已创建,则创建一个新证书。

If it never worked in production you should make sure you're using a production certificate and production device tokens when pushing to production apns server. 如果从未在生产环境中使用过,则应确保在推送到生产apns服务器时使用的是生产证书和生产设备令牌。

EDIT : 编辑:

Did the production notifications stop working after you tested development notifications? 测试开发通知后,生产通知是否停止工作? If that's the case, the problem may be that your database contains both sandbox and production device tokens, and sending a sandbox device token to the production APNS server will drop the connection, which can also cause good messages that were sent after the bad one to be dropped. 如果是这种情况,则问题可能出在您的数据库同时包含沙箱和生产设备令牌,并且将沙箱设备令牌发送到生产APNS服务器将断开连接,这也可能导致不良消息发送到之后,发送好的消息到被丢弃。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM