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

[FR] Guideline for sending web push notifications to iOS 16.4 devices with Firbase

Open leolux opened this issue 1 year ago • 8 comments

I like to use Firebase to send a "hello push" notification to an iPhone running iOS 16.4 which supports the Web Push API.

Key questions are:

  • Do we need to be member of the Apple Developer Program for this feature? I guess not, but any advice is appreciated
  • Will Firebase forward the web push notification to apple automatically the way it does for Android devices or do we need to setup APNs manually?
  • Where to read on how to leverage iOS 16.4 web push support with Firebase?

leolux avatar Feb 28 '23 21:02 leolux

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Feb 28 '23 21:02 google-oss-bot

Hey @chong-shao, do you have any guidelines on this? Thank you!

lahirumaramba avatar Mar 02 '23 22:03 lahirumaramba

I have just got an answer from a Firebase support member: "We're investigating whether this also impacts Firebase Cloud Messaging's ability to deliver to devices with this version."

Please help us to bring some light into the topic:: iOS 16.4 web push notifications with Firebase FCM.

leolux avatar Mar 06 '23 22:03 leolux

Hi @leolux We tested the on macOS & iOS Safari on versions that support the Push API. Should work. We followed https://webkit.org/blog/13878/web-push-for-web-apps-on-ios-and-ipados/ Please give it a shot. couple things to note: 1. make sure push API is enabled on your browser instance (I believe the beta has it default to be off) 2. make sure your web app configs "display: standalone" in its json manifest file

zwu52 avatar Mar 23 '23 17:03 zwu52

@zwu52 Which version are you using?

fred-boink avatar Mar 23 '23 18:03 fred-boink

@zwu52 Which version are you using?

Beta 2 for 16.4

zwu52 avatar Mar 24 '23 17:03 zwu52

@zwu52 @leolux @lahirumaramba Did you have any success sending push to iOS 16.4 using firebase? can u help me? My situation is as follows:

firebase admin version: 9.1.1 iOS version: 16.4 browser: Chrome

My test code and results are shown below: image The result shows that the send was successful, but the iPhone did not receive the push notification.Tried many times and really don't know what to do.Ask for help!

Tips: the same delivery method (same code, same certificate) but with a different device to open the web page was tried with the following results:

  • Android mobile -> send success & received success.
  • Windows -> send success & received success.
  • MacOS -> send success & received success.
  • iOS 16.4 -> send success & received fail.

yourbatman avatar Apr 11 '23 12:04 yourbatman

To add to this; using the subscription info, that is sent to firebase, directly with for example the web-push lib works, but sending to the FCM id returned for the subscription doesn't work.

koenpunt avatar Jun 19 '23 15:06 koenpunt