Open thues opened 8 years ago
No there is not.
If there was, some time could be saved encoding the message, but it would still need to be sent one-by-one to Apple, which is the bulk of the time.
Actually i did it one by one , but there was another problem : If i send large number of msg, there will be many devices can not recv the push and there are little overdue tokens when i fetch feedback . How can i use this package to send batch pushes correctly
If i send the push msg slowly i can get more invalid tokens than more fast push
I'm not sure if I understand the problem you're running into. Is it disconnecting after invalid device tokens and causing problems? http://redth.codes/the-problem-with-apples-push-notification-ser/
This library attempts to handle those issues internally, but maybe you're still running into issues?
I've also been working on another library that uses Apple's new HTTP/2 Notification API, but it is currently slow when doing batch pushes. https://github.com/RobotsAndPencils/buford
Thanks . Now i think i get the point . the problem is that the size of send Buffer(50) , gap of reconnect (1second), the push scale is 1000 pushes per second. If there are many invalid tokens, then it could not push all out successfully.
Yah, perhaps that buffer should be larger.
when we send to many devices with the same message, is there a method to make it called once ?