vapor / apns

Helpful extensions and abstractions for using APNSwift
MIT License
115 stars 29 forks source link

Allow multiple notifications to be sent #36

Closed MrWoWander closed 3 years ago

MrWoWander commented 3 years ago

Adds a new batchSend API to allow multiple notifications to be sent with the same call

0xTim commented 3 years ago

@kylebrowning any thoughts on this? I'm easy either way, it might be useful but not a huge amount of logic for users to implement

kylebrowning commented 3 years ago

This works!

VaporBot commented 3 years ago

These changes are now available in 2.1.0

philipengberg commented 1 year ago

Am I misunderstanding the implementation of this? It seems that, in reality, there's no difference in just using the regular send in a for loop compared to this. At the end of it, batchSend also just sends one push notification at a time. I need to send 250,000 at the same time in parallel, not sequentially. How can this be achieved with this library?

kylebrowning commented 1 year ago

You can't do that with APNS. You have an open connection with Apple so send as many as you want in a for loop with tasks.

I've sent 1 million in 10 seconds.