firebase / firebase-admin-java

Firebase Admin Java SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
526 stars 261 forks source link

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

Open leolux opened 1 year ago

leolux commented 1 year ago

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:

google-oss-bot commented 1 year ago

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

lahirumaramba commented 1 year ago

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

leolux commented 1 year ago

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.

zwu52 commented 1 year ago

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

fred-boink commented 1 year ago

@zwu52 Which version are you using?

zwu52 commented 1 year ago

@zwu52 Which version are you using?

Beta 2 for 16.4

yourbatman commented 1 year ago

@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:

koenpunt commented 1 year ago

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.