Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try this example code and modify for your environment.</p> <pre><code> $apnsHost = '&lt;APNS host&gt;'; $apnsPort = &lt;port num&gt;; $apnsCert = '&lt;cert&gt;'; $streamContext = stream_context_create(); stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert); $apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error, $errorString, 60, STREAM_CLIENT_CONNECT, $streamContext); $payload['aps'] = array('alert' =&gt; 'some notification', 'badge' =&gt; 0, 'sound' =&gt; 'none'); $payload = json_encode($payload); // Note: $device_tokens_array has list of 5 devices' tokens for($i=0; $i&lt;5; $i++) { $apnsMessage = chr(0) . chr(0) . chr(32) . pack('H*', str_replace(' ', '', $device_tokens_array[i])) . chr(0) . chr(strlen($payload)) . $payload; fwrite($apns, $apnsMessage); }?&gt; </code></pre> <p>This article helps verifying drop connection and connection status: <a href="https://stackoverflow.com/questions/2583957/apple-push-notification-sending-high-volumes-of-messages">Apple Push Notification: Sending high volumes of messages</a></p> <p>Other reference links: </p> <p><a href="https://stackoverflow.com/questions/5050363/how-can-i-send-push-notification-to-multiple-devices-in-one-go-in-iphone">How can I send push notification to multiple devices in one go in iPhone?</a> and <a href="https://stackoverflow.com/questions/1642182/how-to-handle-multiple-devices-when-using-push-notification">how to handle multiple devices when using Push Notification?</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload