I'm having trouble figuring out how FCM behaves when I send a notification to an iOS device that is offline (e.g. in airplane mode, or turned off).
The documentation on the time_to_live
property mentions that Currently, time_to_live is not supported for notification messages on iOS.
but doesn't provide an explanation of what is done instead. I've tried testing it, and it seems like a push notification sometimes goes through, and sometimes does not, regardless of what I set the time_to_live
property to be, although I'm not sure if that's due to throttling or something else happening on the FCM side.
Relatedly, I can't seem to get the delay_while_idle
property to work on iOS, although the documentation does not explicitly mention that it isn't available for iOS - notifications that are sent while the phone is asleep still wake the phone, even if I set delay_while_idle
to be true.
Does anyone have any insight into how this is supposed to work?
The
time_to_live
is AFAIK applicable to both Android and iOS. However, since the process of sending the message to iOS devices for FCM goes like this:It is safe to say that only the FCM Server makes use of the
time_to_live
, as per it's description:Looking around, the behavior for APNs when sending to offline devices is (from the Apple docs):
As of now,
delay_while_idle
is now deprecated.The way I know that you could do to wake up an iOS phone (online/connected to a decent network) is to simply set the
priority
tohigh
.