title: iOS APNs push notification send successfully, but notification not receiving in mobile
body: <p>Since Last week Friday (apr 23) everything is working, i received both sandbox and production notification. But when i check now, notification is not working. I checked my .pem file is valid till Dec 2021, When i run the below code the result is 'Message successfully delivered'. I don't know what happened. Please help me.</p>
  <pre><code>&lt;?php
      $deviceToken = &quot;a9eb9cd54446b5cad4fa3636dbe822b5d420126fdbb632ef79b4bf07bfd8b6b4&quot;;
      $passphrase = 'secret';
  
      $message = &quot;Hello world!&quot;;
  
      $ctx = stream_context_create();
  
      $passphrase = 'secret';
      $ctx = stream_context_create();
      stream_context_set_option($ctx, 'ssl', 'local_cert', 'certi.pem');
      
      stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
    /* $fp = stream_socket_client(
                                 'ssl://gateway.push.apple.com:2195', $err,
                                 $errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);*/
      $fp = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $err,$errstr, 60,STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);
      
      if (!$fp){
          exit(&quot;Failed to tess connect: $err $errstr&quot; . PHP_EOL);
      }
      $body = array('aps' =&gt; array('alert' =&gt; $message,'sound' =&gt; 'default','badge' =&gt; 1),'rewards_badge' =&gt; 1);
      
      $payload = json_encode($body);
  
      $msg = chr(0) . pack('n', 32) . pack('H*', $deviceToken) . pack('n', strlen($payload)) . $payload;
      $result = fwrite($fp, $msg, strlen($msg));
      if (!$result){
          echo 'Message not delivered' . PHP_EOL;
      }else{
          echo 'Message successfully delivered' . PHP_EOL;
      }
      fclose($fp);
  ?&gt;
  </code></pre>
  <p>Thanks</p>