Giter Club home page Giter Club logo

Comments (3)

r0b1n avatar r0b1n commented on May 30, 2024

@bohrasankalp you can pass cert and key option under apn section.
Check the doc of dependency module: node-apn

from node-pushnotifications.

miqmago avatar miqmago commented on May 30, 2024

Thanks @bohrasankalp, will update docs.

var settings = {
  gcm: {
    id: null, // PUT YOUR GCM SERVER API KEY,
    options: {}, // Custom GCM request options https://github.com/ToothlessGear/node-gcm#custom-gcm-request-options
    msgcnt: 1,
    dataDefaults: {
      delayWhileIdle: false,
      timeToLive: 4 * 7 * 24 * 3600, // 4 weeks
      retries: 4
    }
  },
  apn: {
    gateway: 'gateway.sandbox.push.apple.com',
    badge: 1,
    defaultData: {
      expiry: 4 * 7 * 24 * 3600, // 4 weeks
      sound: 'ping.aiff'
    },
    // See all available options at https://github.com/argon/node-apn/blob/master/doc/connection.markdown
    cert: "/certs/ios/mycert.cert" // {Buffer|String} The filename of the connection certificate to load from disk, or a Buffer/String containing the certificate data. (Defaults to: cert.pem)
  },
  adm: {
    client_id: null, // PUT YOUR ADM CLIENT ID,
    client_secret: null, // PUT YOUR ADM CLIENT SECRET,
    expiresAfter: 4 * 7 * 24 * 3600, // 4 weeks
    options: {}, // Custom ADM request options, same as https://github.com/ToothlessGear/node-gcm#custom-gcm-request-options
  }
};

from node-pushnotifications.

miqmago avatar miqmago commented on May 30, 2024

I've created a new release with improved system (standarized) so you can specify options for each config system. See docs.

from node-pushnotifications.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.