Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

send_notification returning nil with no status of notification #44

Open
toshitapandey opened this issue Jul 5, 2016 · 2 comments
Open

Comments

@toshitapandey
Copy link

toshitapandey commented Jul 5, 2016

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 ?

@cwilliamsnh
Copy link

I seem to be having the same issue... Is there any way to debug the APNS.send_notification call?

@tfrasc
Copy link

tfrasc commented Sep 29, 2017

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants