From ef2cfac2c055cdfa3958374c68a8d0cfe4e4f046 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 5 Oct 2016 20:37:36 -0400 Subject: fixing stuff for node-apn v2 --- examples/index.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'examples/index.js') diff --git a/examples/index.js b/examples/index.js index 10bcbd7..15de909 100644 --- a/examples/index.js +++ b/examples/index.js @@ -90,26 +90,24 @@ var app = okcms.createApp({ lib: require("./lib/okpush"), mongodbUrl: "mongodb://localhost/okpush_example", apn: { + cert: path.join(__dirname, "./lib/okpush/test_certs/overlayer_dev_cert.pem"), + key: path.join(__dirname, "./lib/okpush/test_certs/overlayer_dev_key.pem"), connection: { gateway: "gateway.sandbox.push.apple.com", - cert: "/path/to/cert.pem", - key: "/path/to/key.pem" - }, - feedback: { - address: "feedback.sandbox.push.apple.com", - cert: "/path/to/cert.pem", - key: "/path/to/key.pem", - interval: 43200, - batchFeedback: true } }, + bundleId: "us.okfoc.overlayer", notifications: { - note.expiry = Math.floor(Date.now() / 1000) + 3600; // Expires 1 hour from now. - note.badge = 3; - note.sound = "ping.aiff"; - note.alert = "\uD83D\uDCE7 \u2709 You have a new message"; - note.payload = {'messageFrom': 'John Appleseed'}; - note.topic = ""; + // expiry (in seconds) + // badge (int) + // alert (message) + // payload (raw json) + hub: { + alert: "The hub has been updated.", + }, + store: { + alert: "The store is now open.", + }, } }, }, -- cgit v1.2.3-70-g09d2