arthurnn / apn_sender

Background worker to send Apple Push Notifications over a persistent TCP socket.
MIT License
377 stars 146 forks source link

send push to multiple tokens #81

Open lgmkr opened 9 years ago

lgmkr commented 9 years ago

Hi, guys, so I have question. What is the rigth way to send push notifications to array of tokens ? Example, input array ["token1", "token2", "token3"] What I do

["token1", "token2", "token3"].each do |token|
   APN.notify_async(token, options blah blah)
end

I think this is not a right way to send multiple notifications. Because each time created new persistent connection to apn socket. Or connection always opened ? Please correct me.

dennislysenko commented 9 years ago

If you read over the readme carefully, it explains that the connection is kept persistent.