I need to send push notifications to mobile iOS.
I used apn_on_rails to send these notifications.
I get my pem file from an iOS developer. I made the following configurations:
In Productions and development in config / configtran / *. rb
RAILS_ROOT, APN::App::RAILS_ENV='production'
configatron.apn.passphrase = 'leo_123'
configatron.apn.port = 2195
configatron.apn.host = 'gateway.sandbox.push.apple.com'
configatron.apn.cert = File.join(Rails.root, 'config', ' apple_push_notification_development.pem')
And then I created one Notificationby following the documentation.
After I executed the following commands, it fits perfectly and responds
From console
APN :: App.send_notifications
Use rake RAILS_ENV = production rake apn: notifications: deliver
I tried this both in a production environment and in a development environment. After this line, it does not respond. I also did not find anything in the magazine.
APN::App Load (0.1ms) SELECT "apn_apps".* FROM "apn_apps"
. ?
.