3 ms·
There are few protocols that were truly worse than Apple's non-HTTP APNS protocol. You can read more at https://developer.apple.com/library/ios/documentation/Ne
by NightMKoder 11y ago
There are few protocols that were truly worse than Apple's non-HTTP APNS protocol. You can read more at https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Appendixes/BinaryProviderAPI.html#//apple_ref/doc/uid/TP40008194-CH106-SW5 https://developer.apple.com/library/ios/documentation/Networ... , but suffice to say, the best part lies in:
If you send a notification that is accepted by APNs, nothing is returned.
If you send a notification that is malformed or otherwise unintelligible, APNs returns an error-response packet and closes the connection.
"Unintelligible" here includes of course invalid tokens, e.g. when the user uninstalls your app.
One of the upgrades was actually returning the last notification that made it through before closing the connection. Before that all you could do was add a sleep() and pray.