PRX / apn_on_rails

Apple Push Notifications on Rails
http://rubydoc.info/github/PRX/apn_on_rails/master/frames
MIT License
538 stars 156 forks source link

Group notification example #35

Closed amithooda closed 12 years ago

amithooda commented 12 years ago

heyy can u provide a group notification example?? and if it is necessary to hav the token of the all devices to which group notification is to be send??

Regards, Amit Hooda

ramigg commented 12 years ago
group = APN::Group.find_by_name('my_group')
APN::GroupNotification.create(:group => group, :badge => 12) # can add also sound, alert etc.
APN::App.send_group_notifications
APN::App.process_devices # Feedback - This is necessary to delete invalid devices
amithooda commented 12 years ago

thnks i was able to send it earlier,,,, but thanks 4 the last step i wasnt knwing that :) ,,,,

hardgolf commented 9 years ago

I am having a problem regarding the group notification. I was able to send it before but now the code line APN::App.process_devices cannot find devices that I want to send