APNS: [app] is offline

APNS: [app] is offline

by Hittesh Ahuja -
Number of replies: 5

I'm pretty sure my Apple certificates (pem and private key) are matching and are correct but I still cant get Apple notifications working for my own version of AirNotifier ( taken fromhttps://github.com/jleyva/airnotifier/tree/moodle2)

Going through the airnotifer log , i see this everytime

[W 151023 16:43:28 apns:166] uobmoodlemobile2[0] is offline 1

The same Airnotifier server seems to works fine for Android where I receive notifications almost instantly using my Project ID and API Key which suggests that the "connection" between Airnotifier server and the moodle message output settings seems to work fine.

Is there a way I could debug this issue ?


Average of ratings: -
In reply to Hittesh Ahuja

Re: APNS: [app] is offline

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi,
are you sure that your APN service is running in production mode?

You should see something like this:


In reply to Juan Leyva

Re: APNS: [app] is offline

by Hittesh Ahuja -

Hi Juan,

Sorry for the late response.

 yes it is in production mode as shown below: 



In reply to Hittesh Ahuja

Re: APNS: [app] is offline

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Have you checked that your server can access to the APNs required ports?

https://support.apple.com/en-us/HT203609

http://stackoverflow.com/questions/1811919/how-to-check-connectivity-of-apns-port-2195-from-my-hosting-server

Usually, if you cannot connect is because invalid certificates or a port restriction problem

Juan

In reply to Juan Leyva

Re: APNS: [app] is offline

by Hittesh Ahuja -

Tried doing 

telnet gateway.push.apple.com 2195

 But i keep getting connection timed out..


I have asked our network team to open the port 2195 on the server where Airnotifier is installed.. I'll post any results here regarding the same .


Thanks,

Hittesh

In reply to Hittesh Ahuja

Re: APNS: [app] is offline

by Hittesh Ahuja -

Hi Juan,

Many thanks for pointing me in the right direction. Opened the 2195 port on our server and provided it with the right apns_developer.pem and .p12 and it now works like a charm! smile 

Best wishes,
Hittesh