November 2013
Intermediate to advanced
576 pages
19h 3m
English
Because Apple prefers push notifications to be sent to APNs with a minimum of socket connections (in other words, they will shut you off if you open and close a connection for every notification), you need to be able to send notifications in batches. The apn_on_rails gem handles this task. When you created notifications in the Shout controller, you just saved them. To actually send them, we need to execute a rake task on our server. First, exit the app on your device so that it is not in the foreground, and then issue this command in the root directory of the server project:
$ rake apn:notifications:deliver
The rake command will create a socket connection to APNs, iterate over any ...
Read now
Unlock full access