Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Safari Push Notification Support (via APN) #1423

Open
digaus opened this issue Dec 10, 2018 · 59 comments
Open

FR: Safari Push Notification Support (via APN) #1423

digaus opened this issue Dec 10, 2018 · 59 comments

Comments

@digaus
Copy link

digaus commented Dec 10, 2018

Any plans on supporting the Safari Push Notifications (implement APN handling and conversion to FCM keys)?

https://developer.apple.com/notifications/safari-push-notifications/

@timscullin
Copy link

+1

6 similar comments
@ganglio
Copy link

ganglio commented Mar 1, 2019

+1

@prashantalhat
Copy link

+1

@avithe1
Copy link

avithe1 commented Apr 10, 2019

+1

@planecore
Copy link

+1

@jetstudio-io
Copy link

+1

@1hakr
Copy link

1hakr commented Aug 11, 2019

+1

@sagivo
Copy link

sagivo commented Oct 21, 2019

+1

@srobertson421
Copy link

+1

This is really needed, still doesn't work in Safari 13

@niklat22
Copy link

niklat22 commented Nov 9, 2019

+1

can we use any third party notification which interact with FCM?

@davwheat
Copy link

Just wondering if there are any updates on this issue as it seems to be completely silent except from users of Firebase.

@Onyoursix
Copy link

Would love an update on this, this is sorely needed

@chukhanhvan
Copy link

+1

1 similar comment
@LRK321
Copy link

LRK321 commented Apr 4, 2020

+1

@andreasanta
Copy link

Same here, it's a big turn down for us, it represents 27% of the Market Share on mobile, and 3% on desktop.

Ignoring Safari on mobile is definitely not an option in our PWA.

@rejhgadellaa
Copy link

@andreasanta You mention Safari on iOS but even Apple's own APN push notifications only work on macOS currently. There is no support for push messages in Safari on iOS. No amount of money, development will change that unless Apple deems it worth the time to implement.

That said: I'd love Safari on macOS support so consider me /subbed

@andreasanta
Copy link

andreasanta commented Apr 12, 2020

@rejhgadellaa So unfortunately true! I thought APN would work on Safari iOS. Apparently, Apple is still determined to restrict core functionality to Apps, so they can cash in a while longer on the App Store purchases. You're right, nothing can change that unless they open the functionality to PWAs.

@malarium
Copy link

malarium commented May 22, 2020

YUP, lack of iOS support truly sucks. But I'm pretty sure that when it is finally introduced by Apple - it will be implemented in FCM, won't it?

@TraMZzz
Copy link

TraMZzz commented May 27, 2020

+1

@AverageHelper
Copy link

AverageHelper commented Jul 31, 2020

I'm sure native iOS support is coming. Meantime, macOS support would be nice.

@mourad1081
Copy link

+1

1 similar comment
@phips28
Copy link

phips28 commented Feb 18, 2021

+1

@lukepighetti
Copy link

lukepighetti commented Feb 25, 2021

I'm at a bit of a loss here. I did what I thought was my due diligence to recommend FCM to a client. Only after finding the messaging/unsupported-browser error in console did I search Stack and realize that macOS Safari, despite Google having an implementation green light, is not supported by FCM.

Checking the WebKit feature roadmap there are no indications that Apple will ever support the Push API. This is 100% in Google's court to implement. There's no point in playing Push API chicken with Apple anymore.

We are already fully prepared to tool up for APN certs for our mobile app, I see no reason why we, as Firebase customers, should be expected to ignore macOS Safari for this feature. I have no idea if this is a political move or not, but either way I don't think we should be left out in the cold here.

@CosmicPangolin
Copy link

CosmicPangolin commented May 9, 2021

@Feiyang1
@mmermerkaya

Is there any progress on this? Increasingly important with Flutter web, and no word for almost two years...

@zwu52
Copy link
Member

zwu52 commented Jun 16, 2021

Hey folks,
Thanks for expressing great interest in having FM supporting MacOS Safari sends.
Apologies for the negligence on this long standing FR. I have brought this up to the team and want to share some updates:

  • FM team has been committing to an internal infrastructure improvement program. Limited capacity is currently dedicated to new features.
  • This FR is in the front queue of the next to be implemented.
  • We are pushing to reprioritize this feature to fit into the infra program.

I'll keep the thread posted on any updates.
Cheers.

@zwu52
Copy link
Member

zwu52 commented Jul 12, 2021

@neekey I assume you are targeting Mac OS Safari. Unfortunately, until this feature is released, you will need to find another way to push data payloads to your Mac OS Safari clients. But you probably know you could already do it to other browsers with the FM SDK with the caveat that you can't silent push.

@samaneh-kamalian
Copy link

Is there any update for this issue?

@AntoineGuerra
Copy link

+1 🤓

1 similar comment
@kashyaprahul94
Copy link

+1 🤓

@zwu52
Copy link
Member

zwu52 commented Dec 28, 2021

Hi folks, thanks for the patience. update:

  • the major FCM internal infrastructure improvement program continues (planned to complete on Q3 2023).
  • We've been observing an increasing number of outages as a result.
  • Therefore, the team has put more weight on reliable refactor and rollout.
  • The current phase is focusing on refactoring the Webpush and IID services and is projected to be completed by Q4 2022.
  • FCM client team (previously driving new feature development) is currently understaffed.
  • Sadly, At this time, we can't provide a clear timeline for this FR. 😞 😿

@lukepighetti
Copy link

the transparency is.. incredible. Thank you

@lukepighetti
Copy link

Way better to wait years for something that takes years, instead of waiting months for something that takes years. The transparency gives you what you need to make decisions, which is all we can ask for

@CosmicPangolin
Copy link

CosmicPangolin commented Jan 6, 2022

Way better to wait years for something that takes years, instead of waiting months for something that takes years. The transparency gives you what you need to make decisions, which is all we can ask for

You're right, that was super unfair of me. This is a valuable feature but it should be done right, and systems work is worth its weight in gold over time. I hope the team gets the staff they need <3

@FirefighterBlu3
Copy link

Howdy, we're now in Q4 of 2022, @zwu52 would you mind posting another update?

@cervenf
Copy link

cervenf commented Nov 21, 2022

@zwu52 Hi, if you could give us an update would great. Thank you :)
seems that mac Safari supports push up now: https://developer.apple.com/videos/play/wwdc2022/10098/

@noobcoder95
Copy link

i'm waiting for update

@sman591
Copy link

sman591 commented Jan 21, 2023

The FCM quick start app runs background notifications successfully for me on Safari 16.2 with macOS Ventura. macOS 13 Ventura (released Oct 2022) is the minimum requirement according to Apple's documentation. Related: #6620

@huksley
Copy link

huksley commented Jan 23, 2023

@sman591 What about iOS? Could you check it?

@lukepighetti
Copy link

Boy, was I wrong. Apple did implement Push API!

@sman591
Copy link

sman591 commented Jan 23, 2023

@huksley Apple's documentation only mentions macOS for Web Push

@barhemo
Copy link

barhemo commented Jan 26, 2023

any news?

@andreififiita
Copy link

andreififiita commented Feb 2, 2023

I tried firebase messaging v9.16.0 in my app also (Safari 16 macos Ventura 13.1) and it seems to work in background (when delivered by the service worker) but in foreground only receives notifications 3 times, then it stops working. Is this a "normal" behavior for some reason?

@andreififiita
Copy link

andreififiita commented Feb 2, 2023

Also, i tested on iOS and i don't understand how can you try the experimental Push API in Safari 16 iOS, since the Notification.requestPermission() function doesn't even exist? https://developer.mozilla.org/en-US/docs/Web/API/Notification/permission

@AverageHelper
Copy link

the Notification.requestPermission() function doesn't even exist

You mean this Notification.requestPermission() function?

@andreififiita
Copy link

the Notification.requestPermission() function doesn't even exist

You mean this Notification.requestPermission() function?

Exactly, iOS doesn't have that at 16.2 from what i tested. Or do we have at least a substitute for iOS?

@rejhgadellaa
Copy link

Web Push for Safari is currently only available on macOS 13.x.

( Even though you can install the latest Safari on macOS 12, that version will not have Web Push because their implementation requires the OS update. It relies on some new system service (yes, really...) )

For iOS and iPadOS, Web Push support will come in 2023:
https://webkit.org/blog/12945/meet-web-push/

@andreififiita
Copy link

Web Push for Safari is currently only available on macOS 13.x.

( Even though you can install the latest Safari on macOS 12, that version will not have Web Push because their implementation requires the OS update. It relies on some new system service (yes, really...) )

For iOS and iPadOS, Web Push support will come in 2023: https://webkit.org/blog/12945/meet-web-push/

Yes, i actually connected to the ios 16 simulator Safari console and checked the JS APIs. PushManager is there (and other Push API classes) but Notification is missing (needed for Notification.requestPermission). Also navigator.permissions.query throws exception for name: "notifications". Maybe the boys at safari still need a bit more time to finish the user prompt popup for asking permissions...

@NataliaTsoy
Copy link

Hi guys. Checking the browser firebase.messaging.isSupported() returns true in Safari 16.3 macOS 13, but messaging.getToken() returns nothing. Does this mean that web push for Safari are not available on firebase?
After a bit of debugging, I got that Safari requires initialization of the Service Worker before requesting permission from the user. And if I initialize the Service Worker before, then the getToken() function updates this Service Worker and it seems to block the permission request

@josehigroup
Copy link

+1 would be awesome to get!

@MrAlexand0r
Copy link

MrAlexand0r commented Nov 14, 2023

Hi guys. Checking the browser firebase.messaging.isSupported() returns true in Safari 16.3 macOS 13, but messaging.getToken() returns nothing. Does this mean that web push for Safari are not available on firebase? After a bit of debugging, I got that Safari requires initialization of the Service Worker before requesting permission from the user. And if I initialize the Service Worker before, then the getToken() function updates this Service Worker and it seems to block the permission request

Have you found a solution for this? I have the same Problem.
isSupported() returns true but the getToken(...) Promise is never resolved. No error or anything.
Weirdly enough, this occurs only on MacOS Safari. On iPadOS and iOS Safari it's working as intended

@NataliaTsoy
Copy link

Have you found a solution for this? I have the same Problem. isSupported() returns true but the getToken(...) Promise is never resolved. No error or anything. Weirdly enough, this occurs only on MacOS Safari. On iPadOS and iOS Safari it's working as intended

no, no solution has been found. I did it with APNs without the participation of firebase

@shinde-prasad
Copy link

HI @NataliaTsoy , how it is behaving on iphone 13 or safari version 7 to 13.
I am checking this in PWA app using firebase": "^10.8.0" and @firebase/messaging": "^0.12.6, latest version library.
I am not able to get any popup for notification permission and getting error firebase not supported in browser.

@mourad1081
Copy link

mourad1081 commented Mar 21, 2024

We're almost half a decade later now...

@zwu52
Copy link
Member

zwu52 commented Apr 29, 2024

Circling back to the thread, https://firebase.blog/posts/2023/08/fcm-for-safari/ provides some info on how to push to ios safari

@andreififiita
Copy link

It doesn't work in Safari 17.4 anymore (tested on MacOS, but i believe iOS also won't work). It was working fine from Safari 16.3 to 17.3. I posted details here, in case anyone is experiencing the same issues: https://stackoverflow.com/questions/78323312/firebase-cloud-messaging-web-issues-in-safari-17-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests