3

I have 10,000,000 device tokens for APNs.

But the token where collected from 2011, and some people probably deleted the app since then.

Therefore many tokens may have become invalid.

I want to filter these invalid tokens. How can I do that?

I tried the pyapns==0.4.0 , but check is slow, maybe there's a bug. I use the print push.disconnections(app_id = 'aphid', environment = 'production') but only get one invalid token.

So I think I should try a simple python code for this work.

1 Answer 1

2

First you should realize there's a difference between invalid tokens (tokens that were never valid in the current push environment) and tokens belonging to devices from which your app was uninstalled.

If all the device tokens in your DB were received from the APN service and you didn't mix production and sandbox tokens in the same DB, then all your tokens should be valid. In that case, you can send a notification to all of the device tokens and run the feedback service to find out which of them belong to devices that uninstalled your app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.