pypush icon indicating copy to clipboard operation
pypush copied to clipboard

Request queued messages from APNs

Open Spidy123222 opened this issue 1 year ago • 5 comments

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.

Spidy123222 avatar Sep 19 '23 05:09 Spidy123222

Yeah but no, this feature requires iCloud history ^^

topiga avatar Sep 19 '23 05:09 topiga

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.

TaeHagen avatar Sep 19 '23 18:09 TaeHagen

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.

sumnerevans avatar Sep 25 '23 16:09 sumnerevans

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?

TaeHagen avatar Sep 25 '23 23:09 TaeHagen

It seems to send it randomly, but you can request it with 160.

sumnerevans avatar Sep 26 '23 04:09 sumnerevans