summaryrefslogtreecommitdiff
path: root/plugins/phonegap-plugin-push/example/server/pushAPNS.rb
blob: 45a69a7dd4dcf4c01f4f3ff19f14b0f7866bd19d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require 'rubygems'
require 'pushmeup'


APNS.host = 'gateway.sandbox.push.apple.com' 
APNS.port = 2195 
APNS.pem  = '</path/to/my/certificate/ck.pem>'
APNS.pass = '<myCertificatePassword>'

device_token = '<device token gleaned from xcode console>'
# APNS.send_notification(device_token, 'Hello iPhone!' )
APNS.send_notification(device_token, :alert => 'PushPlugin works!!', :badge => 1, :sound => 'beep.wav')