How does the new GCM handle APNS feedback?

I tried the new GCM feature to send notifications to iOS devices. Everything worked very smoothly, except for the feedback message. I assume that after GCM sends a message through APNS, GCM also calls the APNS feedback service to receive invalid tokens. The next time we use the same device token in GCM, it should respond with an error message. I tried several times to uninstall the application, but never received an error message from GCM. Each time it shows a success message. What is wrong here?

Note. If you are not familiar with the new GCM features, please do not blindly respond to this.

+5
source share
2 answers

I think the problem is in the environment. I am using a developer certificate to verify notification. APNS cannot provide any details for the developer environment. I hope he will work in production.

Update


Support from Google provided the following data.

We did a digging, it looks like APNS is handling things:

  • When the last sandbox application is removed from the device, the device disconnects from the APNS sandbox and can no longer receive push or provide feedback. Thus, APNS feedback does not register that the device has been removed.
  • If you install another push sandboxed application on your device, it will start connecting to APNS again. And we checked that in this circumstance we get a notification that the device was removed and returned NotRegistered to our client.
+2
source

APNS feedback service is not instant. GCM polls the APNS feedback service, but in my experience it was a little delayed (not sure if it was an APNS delay or a GCM delay).

You need to wait a while, and then try to use the old registration token, and you should see the error "Invalid registration token."

0
source

All Articles