PHP technique to query the APNs Feedback Server

前端 未结 5 1036
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-27 11:15

Can someone clarify what the APNs (Apple Push Notification) wants as far as how you query it?

The docs say it starts sending as soon as the connection is made. Does

5条回答
  •  一整个雨季
    2020-11-27 12:13

    This finally worked for me.

    $arr = unpack("H*", $devconts); 
    $rawhex = trim(implode("", $arr));
    
    $feedbackTime = hexdec(substr($rawhex, 0, 8)); 
    $feedbackDate = date('Y-m-d H:i', $feedbackTime); 
    $feedbackLen = hexdec(substr($rawhex, 8, 4)); 
    $feedbackDeviceToken = substr($rawhex, 12, 64);
    

    And then you simply check for the device token against the timestamp!

提交回复
热议问题