I am experimenting with Apple Push Notification Service with node.js as a server. While I work, and when it works, it works as intended.
However, sometimes the message does not come. I am not sure if this is natural (maybe I have a bad connection, and because of this the message does not come out), or if this is an error in my code. The situation is really random. Sometimes this happens, and sometimes not, although I did not change the code or anything else.
I use node-apn (https://github.com/argon/node-apn), and according to the debug console, it is registered as successfully passing - at least from the server side. Here's the debug message:
apn Initialising connection +19s apn Initialising module +1ms apn Connection established +383ms apn Sending notification +0ms apn Socket drained +1ms apn Socket writeable +0ms
This message appears both during the passage of the message, and in its absence. Therefore, I think that node-apn is doing its job. It also means:
- Something is happening between the server and the Apple server.
- Something is happening between the Apple Push server and my iOS device.
But I do not know how to find out what is happening. So I am trying to find a solution:
- Find out if my APNS push notification is registered
- Find out if APNS sends all notifications to iDevice
Does anyone know how to do this? Thank you very much!
source share