summaryrefslogtreecommitdiff
path: root/plugins/phonegap-plugin-push/example/server/pushAPNS.rb
diff options
context:
space:
mode:
authorArjun Roychowdhury <pliablepixels@gmail.com>2015-10-18 20:27:36 -0400
committerArjun Roychowdhury <pliablepixels@gmail.com>2015-10-18 20:27:36 -0400
commitced14a385a8606319e5d7d604f65c7a33c8e1476 (patch)
treea146b48048b31fd36c6a0336052ee5d2c34093b4 /plugins/phonegap-plugin-push/example/server/pushAPNS.rb
parent50f2e00b5be8c0e13e5790c11cc2dc234577d447 (diff)
switched to new push plugin that works with JSON payloads
Diffstat (limited to 'plugins/phonegap-plugin-push/example/server/pushAPNS.rb')
-rw-r--r--plugins/phonegap-plugin-push/example/server/pushAPNS.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/phonegap-plugin-push/example/server/pushAPNS.rb b/plugins/phonegap-plugin-push/example/server/pushAPNS.rb
new file mode 100644
index 00000000..45a69a7d
--- /dev/null
+++ b/plugins/phonegap-plugin-push/example/server/pushAPNS.rb
@@ -0,0 +1,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')