tags:

views:

75

answers:

0

Hi,

I've been reading this forum

http://stackoverflow.com/questions/1278834/php-technique-to-query-the-apns-feedback-server

And have done most everything that they have mentioned.

I have the following code...

$apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext);
    if (!$apns) 
    {
        echo 'APNS ERROR - ' . $errorString;
        $success = FALSE;
    }
    else
    {
        echo 'connection ok';

        $feedback_tokens = array();
        while(!feof($apns)) 
        {
            $data = fread($apns, 38);
            if(strlen($data)) {
                $feedback_tokens[] = unpack("N1timestamp/n1length/H*devtoken", $data);
            }
        }

... and so on...

I've set up the dummy app mentioned in that forum on my development device, but I never seem to get anything in the "while(!feof($apns))" piece as I have added traces and I don't get anything.

My process is as follows:

I install my app on the device. I send it a push notification. I delete the app. I try to send another notification. I check the feedback.

The feedback always seems to be empty. This may just be an issue with my process, but if anyone could help kick me in the right direction it would be MUCHLY appreciated.

Thank you,

--d