[PR #899] [MERGED] fix(pwa): hide install prompt on macOS 14 safari #1453

Closed
opened 2026-05-07 01:02:10 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/899
Author: @nihalgonsalves
Created: 9/27/2023
Status: Merged
Merged: 10/2/2023
Merged by: @binwiederhier

Base: mainHead: ng/fix-safari-17-sonoma


📝 Commits (4)

  • 66ef28c fix(pwa): hide install prompt on macos 14 safari
  • 5913142 fix: remove deprecated nodesource script
  • d33eded docs: remove Safari sound warning
  • 65dff6e Merge branch 'main' into ng/fix-safari-17-sonoma

📊 Changes

4 files changed (+28 additions, -9 deletions)

View changed files

📝 Dockerfile-build (+11 -7)
docs/static/img/pwa-install-macos-safari-add-to-dock.png (+0 -0)
📝 docs/subscribe/pwa.md (+7 -0)
📝 web/src/app/Notifier.js (+10 -2)

📄 Description

macOS 14 has support for "Add to Dock", which added the window.navigator.standalone property to macOS. This was previously only on iOS and we relied on it to display the "install required" prompt.

Since the limitation of needing an installed web app does not exist on desktop Safari, ntfy therefore wrongly stops you from using the web app notifications. This changes the heuristic to only display the install prompt when the push manager API is not available.

I also added a screenshot of the new Safari "Add to Dock" action to the docs.

While testing it I saw a deprecation warning when using the node source script, so I fixed that too - I can move that to another PR if wanted.

Before After
Screenshot showing the iOS alert wrongly appearing on macOS 14 Fixed version, without the erroneous alert

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/899 **Author:** [@nihalgonsalves](https://github.com/nihalgonsalves) **Created:** 9/27/2023 **Status:** ✅ Merged **Merged:** 10/2/2023 **Merged by:** [@binwiederhier](https://github.com/binwiederhier) **Base:** `main` ← **Head:** `ng/fix-safari-17-sonoma` --- ### 📝 Commits (4) - [`66ef28c`](https://github.com/binwiederhier/ntfy/commit/66ef28c2e299b8736e2a749c512abdd2f9001be8) fix(pwa): hide install prompt on macos 14 safari - [`5913142`](https://github.com/binwiederhier/ntfy/commit/5913142389d8b6718b8f4f12277afa36a18aa751) fix: remove deprecated nodesource script - [`d33eded`](https://github.com/binwiederhier/ntfy/commit/d33eded060a55d0956fb043c78045da668d0fce9) docs: remove Safari sound warning - [`65dff6e`](https://github.com/binwiederhier/ntfy/commit/65dff6e8e3baa8ed10620b642f9e03e37ed2d9ba) Merge branch 'main' into ng/fix-safari-17-sonoma ### 📊 Changes **4 files changed** (+28 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile-build` (+11 -7) ➕ `docs/static/img/pwa-install-macos-safari-add-to-dock.png` (+0 -0) 📝 `docs/subscribe/pwa.md` (+7 -0) 📝 `web/src/app/Notifier.js` (+10 -2) </details> ### 📄 Description macOS 14 has support for "Add to Dock", which added the `window.navigator.standalone` property to macOS. This was previously only on iOS and we relied on it to display the "install required" prompt. Since the limitation of needing an installed web app does not exist on _desktop_ Safari, ntfy therefore wrongly stops you from using the web app notifications. This changes the heuristic to only display the install prompt when the push manager API is not available. I also added a screenshot of the new Safari "Add to Dock" action to the docs. While testing it I saw a deprecation warning when using the node source script, so I fixed that too - I can move that to another PR if wanted. | Before | After | | --- | --- | | ![Screenshot showing the iOS alert wrongly appearing on macOS 14](https://github.com/binwiederhier/ntfy/assets/10807310/ec55604f-cfb9-4de9-81e5-7ca82ceb146a) | ![Fixed version, without the erroneous alert](https://github.com/binwiederhier/ntfy/assets/10807310/ac82f656-fdec-43a9-bb74-0e4355fe6e51) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:02:10 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1453
No description provided.