Comments (4)
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.
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.
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.
That's a good idea ! thanks.
from node-apn.
Related Issues (20)
- session.close is not a function HOT 1
- Is it possible to use dry-run parameter with this library?
- Push notification is not working on https
- 1
- Error: Socket unusable after connection. Hint: You may be using a certificate for the wrong environment HOT 1
- Deploying to Flywheel workflow failing saying inputs not valid
- ERR_CRYPTO_OPERATION_FAILED HOT 3
- High Vulnerability on node-forge-0.7.6.tgz (Vulnerable Library)
- iOS Push Notification Error: {reason: 'TopicDisallowed'} HOT 3
- How to send Communication Notifications? HOT 5
- Critical security vuln: jsonwebtoken HOT 2
- Live Activity Support
- How to use P12 files to send pushes HOT 7
- Send Push Notification To Apple Watch
- apn write failed: GOAWAY: PROTOCOL_ERROR Stream 5 does not exist HOT 1
- The future of `node-apn`
- Show In Foreground?
- Dynamically or using RESTful API to add device
- What is the right way to send a silent push notification(content-available = 1) in 2024?
- Port from http to fetch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-apn.