Is Firebase Not Always Sending Notifications Through APNs?
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.
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.
- → Function Undefined in Axios promise
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Click to navigate on mobile devices
- → Playing Video - Server is not correctly configured - 12939
- → How to allow api access to android or ios app only(laravel)?
- → Axios array map callback
- → Access the Camera and CameraRoll on Android using React Native?
- → Update React [Native] View on Day Change
- → Shopify iOS SDK - issue converting BuyProductVariant to BuyProduct
- → BigCommerce and shopify API
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → React Native - Differences between Android and IOS
- → What is the difference between React Native and React?