Identify Invalid Tokens from Apple Push Notifications

So this is my first application development that uses APN. I ended up mixing development and production device markers. APNS apparently ignores notifications that include development tokens when using a product certificate. Does anyone know how I can determine which tokens are invalid (developer token) so that I can remove them from my server?

+4
source share
1 answer

You identify such invalid device tokens using the extended message format to send Apple notifications and try to read from the socket to get error responses. An invalid device token will cause Apple to respond to the error before closing it. The difficult part allows you to read the error response before closing the socket.

This Technical Note provides a good explanation.

+2
source

Source: https://habr.com/ru/post/1444645/


All Articles