我正在尝试让我的 django 应用程序向运行此服务的 iOS 应用程序的 iOS 设备发送推送通知。我正在尝试使用pyapns发送通知。但我无法让它连接到 Apple 推送通知服务器。
服务大部分都完成了,这是我在退出测试版之前想要开始工作的最后一件事。您可以访问http://pagemove.se/了解该应用程序。
这是日志:
Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 75, in wrapper return func(*a, **kw) File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 67, in wrapper return func(*a, **kw) File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 97, in notify return _xmlrpc_thread(*f_args) File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 127, in _xmlrpc_thread errback(e) File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 65, in errback_wrapper errback(e) # not an instance of UnknownAppID - nothing we can do here File "/usr/local/lib/python2.7/dist-packages/pyapns/client.py", line 55, in errback raise e xmlrpclib.Fault:
有人遇到过这个问题吗?.pem 文件可以相同吗?还是ubuntu-server的设置?我是不是忘记在路由器中打开某些端口了?
编辑
我做了一个测试,以确定 apns 的端口是否打开。我做了
telnet gateway.sandbox.push.apple.com 2195
并得到
Trying 17.149.34.65...
Connected to gateway.sandbox.push-apple.com.akadns.net.
Escape character is '^]'.
我确实认为服务器和路由器设置正确。