firebase-admin-node icon indicating copy to clipboard operation
firebase-admin-node copied to clipboard

[FR] Messaging: Support for iOS 18.4 Declarative push messages

Open acrobid opened this issue 9 months ago • 5 comments

Declarative push messages are a new feature in iOS 18.4 that allow push messages to web apps without service worker handling. This greatly improves the deliverability of background notifications for web apps on iOS.

This requires the addition of an extra top level field in the Message interface as described here.

Please allow the optional "web_push" (integer) field to the Message interface to enable Declarative push messages.

Currently, when adding this field, I receive the following validation error:

Error: Failed to send notification: Invalid JSON payload received. Unknown name "web_push" at 'message.webpush': Cannot find field.

More information on this feature here.

acrobid avatar Apr 06 '25 14:04 acrobid

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Apr 06 '25 14:04 google-oss-bot

@chong-shao

@lahirumaramba

Here is more background on why it is important, and how it doesn't break backwards compatibility:

https://developer.apple.com/videos/play/wwdc2025/235/?time=0

acrobid avatar Jul 09 '25 14:07 acrobid

Hello @acrobid , the API Admin SDK exposes needs to align with FCM's REST API

Could you file a feature request to FCM https://firebase.google.com/support/troubleshooter/report/features first, once that's accepted and implemented, we can start add the same feature in Admin SDK.

chong-shao avatar Jul 09 '25 21:07 chong-shao

@chong-shao Thanks for the link. I just submitted a feature request using the form and provided a link to this issue, as well as some context. It is assigned as Case 10366664: Support for iOS 18.4 Declarative push messages.

For requests like this, from what I understand from @mbleigh, "we need to have an internal champion take it through a review process". @lahirumaramba Is there anyone willing to ping that team to flag that request?

The reason this is such a big deal is "bugs in a service worker script, networking conditions, or local device conditions all might prevent a timely call to showNotification. These scenarios might not always be the fault of the script author." When this happens, iOS revokes the pull subscription .

Until this is implemented, FCM web push notifications on iOS will continue to be unreliable.

acrobid avatar Jul 10 '25 00:07 acrobid

@chong-shao any updates on this? Do you know if the feature request made it into the FCM queue?

acrobid avatar Sep 30 '25 01:09 acrobid