I noticed that the firebase documentation says the following:
If a notification payload is provided, or the content_available option is set to true for a message to an iOS device, the message is sent through APNs, otherwise it is sent through the FCM connection server.
Can someone please explain what that means?
I thought ALL push notifications sent to iOS devices, are first sent to Apple, and then forwarded by Apple to the corresponding device/s, but here it is implied that they're sending messages directly to the device?
Is that even possible when the app is shut on iOS?
I'm confused, thank you.
FCM delivers all messages targeting Apple apps through APNs. To learn more about receiving APNs notifications via UNUserNotificationCenter, see Apple's documentation on Handling Notifications and Notification-Related Actions.
Maximum message rate to a single device For Android, you can send up to 240 messages/minute and 5,000 messages/hour to a single device.
When the app is in the foreground, FCM can connect directly rather than go via APNs for data
type messages. Messages sent when in the background are delivered via APNs as you'd expect. You can actually take a look at the source of the FCM client if you're so inclined!
You can control whether this is used with the shouldEstablishDirectChannel property.
From the sending perspective, you don't need to worry too much about this - its handled transparently as part of the FCM service based on the type of the message and whether there is a client connected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With