0

I have installed ios app on my 3 ios devices and registered them for push notification, when I send Test Push notification, it came to all 3 devices. Later on I uninstalled app from one device and again send the Test Push notification and got the Test messages on two devices. When I ran cron feedback service invoked but it does not returned any response to delete the registered token. Any help would be appreciated.

2 Answers2

0

Try to send another push notification to the device from which you uninstalled the app and try the Feedback Service again.

APNS identifies that the app was uninstalled only when it tries to deliver a push notification to it. That's why the first message sent after uninstalling allows APNS to know the app was uninstalled, and only after the second message sent to that device, the device token will be returned by the Feedback Service.

Eran
  • 387,369
  • 54
  • 702
  • 768
  • I have send another push notification to the device from which I uninstalled the app and Invoked feedback service API but still it is giving NULL response. It would be great if you share working example/demo with me. – mayurjadhav Aug 04 '14 at 10:03
  • @mayurjadhav You may have problems in your code. Please post your code for accessing the feedback service. – Eran Aug 04 '14 at 15:58
  • $streamContext = stream_context_create(); stream_context_set_option($streamContext, 'ssl', 'local_cert', 'apns-development-7ac5b639b8.pem'); $apns = stream_socket_client('ssl://feedback.sandbox.push.apple.com:2196', $error, $errorString, 60, STREAM_CLIENT_CONNECT, $streamContext); $token = unpack('Ntime/nlength/H*token', $apns); $feedback_tokens = array(); while (!feof($apns)) { $data = fread($apns, 38); if (strlen($data)) { $feedback_tokens[] = unpack("N1timestamp/n1length/H*devtoken", $data); } } $result = fread($apns, 38); echo 'result=' . $result; fclose($apns); – mayurjadhav Aug 05 '14 at 05:06
0

I'm struggling with this too. PHP technique to query the APNs Feedback Server <-- that post has been the most helpful so far.

I also found

The feedback service will not flag a deleted app if it is the last/only push enabled app on the device. To test successfully, you will need to install another push enabled app and leave that app installed after you delete the app you are testing.

which I have yet to test myself. I don't understand why this would be the case.

My test devices are also used for personal use so I have multiple push enabled apps on them, I have yet to get a token to be flagged as deleted on the feedback service.

Lastly, note that

The feedback service’s list is cleared after you read it. Each time you connect to the feedback service, the information it returns lists only the failures that have happened since you last connected.

This is a nightmare to test.

Community
  • 1
  • 1
kev
  • 2,306
  • 3
  • 26
  • 31