push-core
push-core copied to clipboard
Does not work in sandbox mode
I have a server on heroku
Configuration looks like this
Push::ConfigurationApns.create(app: 'MyApp', connections: 2, enabled: true,
certificate: File.read('apns.pem'),
feedback_poll: 2,
sandbox: true)
However, it is still connecting to production gateway. Here is what I get from the logs
2017-11-03T09:21:23.192081+00:00 app[push.1]: [2017-11-03 09:21:23] [MyApp: ConnectionApns 1] Connected to gateway.push.apple.com:2195
2017-11-03T09:21:23.372482+00:00 app[push.1]: [2017-11-03 09:21:23] [MyApp: ConnectionApns 2] Connected to gateway.push.apple.com:2195
Thanks in advance for your help
The host is set here: https://github.com/tompesman/push-apns/blob/master/lib/push/daemon/apns_support/connection_apns.rb#L16 so it looks like it is false there.
If you query the configuration is the sandbox value true or false?
It remains false
for some reason. Maybe this could be some issue connected directly with heroku... Seems I need to investigate for a while