pypush
pypush copied to clipboard
Request queued messages from APNs
On iOS it currently receives missed messages on boot if device was turned off for multiple hours of time and starting up it takes a bit of time but it receives messages that were missed. This would be very useful for locally ran stuff like inside of a app or executable where it might not always be active and someone could message during that time.
Yeah but no, this feature requires iCloud history ^^
IIRC even a real Mac doesn't catch up on missed messages (i know some messages i've sent have gone missing when the mac was offline for large periods of time). I know APNs will redeliver missed messages, but after a while it throws them away (not sure how long?). I think iCloud sync is used for that on real iDevices to fill in those gaps, which we haven't implemented.
When you connect and there's stuff in the APNs queue, you will receive a message with command=160. It means that you need to ask for APNs to send you the queue. The way to do this is to send back a command=160 message and it will send you everything you missed.
Huh, I never did that and apns still seems to redeliver everything for me anyways. Tho it does it multiple times, maybe i need to send the 160?
It seems to send it randomly, but you can request it with 160.