Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Created August 5, 2016 23:00
Show Gist options
  • Select an option

  • Save brianleroux/37f9545debc703b23f041a9efb531fc0 to your computer and use it in GitHub Desktop.

Select an option

Save brianleroux/37f9545debc703b23f041a9efb531fc0 to your computer and use it in GitHub Desktop.

Revisions

  1. brianleroux created this gist Aug 5, 2016.
    18 changes: 18 additions & 0 deletions wtf-sns-apns.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    sns.publish({
    TargetArn: device.arn,
    MessageStructure: 'json',
    Message: JSON.stringify({
    default: 'you will never see this muah!',
    APNS_SANDBOX: JSON.stringify({
    aps: {
    'alert': '',
    'content-available': 1
    },
    'event-category': eventname
    })
    })
    },
    function __notifiedAPNS(err, data) {
    console.log(err, JSON.stringify(data, null, 2))
    callback()
    })