What I did as a test is following:
I made example app where I enabled push notifications and implemented mechanism for handling them.
I was testing sending of silent push notifications to my app with
curl
and that works pretty well. I am testing that with:curl -v -d '{"aps":{"content-available":1}}' --cert "/Users/me/Desktop/mycert.pem":"" -H "apns-topic:com.domain.name" --http2 https://api.development.push.apple.com/3/device/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
As an answer from Apple, I am always seeing following:
< HTTP/2.0 200
< apns-id:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX
Which is fine and as expected, according to
Table 6-4
from the official docs: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/APNsProviderAPI.htmlNow I delete the app from my device and I retry the same request kinda hoping that I will start getting status code
410
and info thatThe device token is no longer active for the topic
. How ever, that doesn't happen and I am always getting200
status code like everything's fine and that the push token is still available.
1 - 1.5 hours after deletion, I am still getting 200
as an answer.
Do you maybe know how often does Apple refresh push tokens list and when I can expect to eventually start getting 410
? And also - is 410
status (and Instant Feedback
in general) testable at all while testing the app outside of production environment?
Thanks in advance for any kind of answer.
Cheers