0

I'm using apnagent to send apns messages. After followed the tutorial, I didn't see anything about dealing with multiple device tokens.

I know we can do a loop easily but I want to know if there's a more efficient way to do this.

for(var i = 0; i < tokens.length; i++){
    token = tokens[i];
    agent.createMessage()
        .device(token)
        .alert('hello')    
        .send();
}

Thanks for the help.

Cheers, Mars

János
  • 32,867
  • 38
  • 193
  • 353
Mars Zhu
  • 296
  • 2
  • 13

1 Answers1

0

Actually I use a for loop to send multiple notifications (4000 users) and it works successfully.

Careuno Merchan
  • 186
  • 2
  • 9