i am working on a app where there is need to send bulk push notification from the Php server to ios devices . Is there any way to send multiple push notification from Php server to all devices without using any Loop. *because this loop process reduce response time to client from the server
If you are using ApnsPHP, then there is a way. This code is from his sample_push_many.php
file. First you have to add all the recepients
$push->connect();
for ($i = 1; $i <= 10; $i++) {
$message = new ApnsPHP_Message($i == 5 ? INVALID_TOKEN : VALID_TOKEN);
$message->setCustomIdentifier(sprintf("Message-Badge-%03d", $i));
$message->setBadge($i);
$push->add($message);
}
$push->send();