Open toshitapandey opened 8 years ago
I seem to be having the same issue... Is there any way to debug the APNS.send_notification call?
@toshitapandey @cwilliamsnh are you in dev/sandbox or production? In dev/sandbox the APNS.host
should be gateway.sandbox.push.apple.com
, production should be gateway.push.apple.com
.
I also had trouble using #{Rails.root}
, trying using Rails.root.join('doc/pushcert.pem')
, that worked for me.
I'm using following for sending the notification.
APNS.host = 'gateway.push.apple.com'
APNS.pem = "#{Rails.root}/doc/pushcert.pem"
APNS.port = 2195
APNS.send_notification(token, message)
but all it is returning is
nil
and notifications are not being sent and all the associated article call APNs a black box with not round about for this. Is there any way to figure out the errors and reasons for notifications not being delivered ?