Code Monkey home page Code Monkey logo

Comments (4)

argon avatar argon commented on June 3, 2024

Apple will only send an error back if there is a problem, it doesn't send confirmation when the message is delivered because of the high volume of notifications they handle. You could have a very short timer (~1-2seconds) and if an error hasn't been thrown since then you can assume it was sent successfully. But it's best not to do anything, it's a "fire and forget" system. You could perhaps notify the user by some other means if an error occurs?

from node-apn.

 avatar commented on June 3, 2024

I know that Apple doesn't send confirmation when the message is delivered.

I've html page where I create the message to send. When I click on send button I check in my database the corresponding devices which have these parameters and I create the payload and send it to the APNS with your 'plugin'. When an error occur you try again, if I'm not wrong.

I want to send to the html page the errors and show it. Any idea ?

Thanks

from node-apn.

argon avatar argon commented on June 3, 2024

When an error occurs the library will attempt to find the notification sent immediately after the one which failed and resume sending from there (if your cache - set in options - isn't big enough then messages may be lost). Whenever an error occurs errorCallback will be called with the notification in question which caused the problem. What I suppose you could do is have each notification failure logged to a database and then have a webpage which can query the database of errors to show any appropriate to the user.

from node-apn.

 avatar commented on June 3, 2024

That's a good idea ! thanks.

from node-apn.

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.