Have ideas to improve npm?Join in the discussion! »

    hand-over-apns

    1.0.0-0 • Public • Published

    view on npm downloads per month node version build status test coverage license

    Apple Push Notification Service plugin for Handover.

    Usage

     
    const Handover = require('hand-over'),
          notifier = new Handover
     
    notifier.use('apns', {
        cert:       'path/to/certificate.pem',
        key:        'path/to/key.pem',
        passphrase: 'your passphrase',
    })
     
    notifier.send('userId', {
        expiry: Math.floor(Date.now() / 1000) + 3600, // 1 hour
        count: 42,
        sound: 'ping.aiff',
        alert: 'Notification title',
        payload: { test: 'test' }
    }, callback)
     
    function callback(err) {
        if (err)
            console.error(err.stack)
        else
            console.log('yay!')
    }
     

    Note: Options are passed to the apn package's Connection constructor.

    Installation

    With npm:

    npm install hand-over-apns
    

    License

    MIT

    Install

    npm i hand-over-apns

    DownloadsWeekly Downloads

    1

    Version

    1.0.0-0

    License

    MIT

    Last publish

    Collaborators

    • avatar