Send APNs
“‘ruby device = UserDevice.where(’apn_token IS NOT NULL’).first
if device.present?
payload = {:aps => {:alert => "Hey Boy! Let's roll...", :sound => 'annoying_beep'}} apn = [KwAPN::Notification.create(device.apn_token, payload)] status, ret = KwAPN::Sender.push(apn, 'TestSession')
end “‘