Firebase supports Notification messages and Data messages.
Data messages don't trigger visual notification and are handled by the client (iOS App) when the app is in foreground. Communication is then done using direct channel between Firebase and iOS App - without use of Apple Push Notification Service (APNS).
Everything works fine when we use Legacy FCM HTTP Protocol but when using new HTTP v1 API, Data messages are not delivered to iOS client.
Notification messages (even including data) are delivered fine using via APNS.
We have tried interfacing to Firebase Cloud Messaging using:
None of the above would result in Data message to be delivered to the iOS client. Such messages are only delivered when being sent using legacy HTTP Protocol.
To make things more interesting Data messages send using HTTP v1 API (new) are successfully delivered to web JavaScript client, so it means that they are supported. They are also used in samples. We haven't tried the Android client.
For Apple client apps, you can receive notification and data payloads up to 4000 bytes over the Firebase Cloud Messaging APNs interface.
Safari still does not support Web Push API, thus Firebase Cloud Messaging service.
From the Firebase Cloud Messaging docs on handling direct FCM channel messages:
Caution: To use the FCM direct channel this way, you must send messages using the legacy HTTP API. The HTTP v1 API uses APNs for all messages sent to iOS devices. See FCM server protocols.
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