WalletConnect / a2

An Asynchronous Apple Push Notification (apns2) Client for Rust
MIT License
136 stars 47 forks source link

Fix `TooManyProviderTokenUpdates` issue #44

Closed jacobh closed 4 years ago

jacobh commented 4 years ago

I've tweaked token signature TTL to 55 minutes to avoid triggering TooManyProviderTokenUpdates errors which I was reliably seeing after about a minute when sending push notifications periodically every 10 seconds as a test.

The Apple docs mention the token should be refreshed at least once every 60 minutes https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html

image
pimeys commented 4 years ago

Oh wow, they tightened the rules. I think the original value was also a typo, it should've been 60 * 45. Thank you for the PR, I'll publish an update.