When you receive a push notification on the iOS PWA it will correctly open the correct PWA for you.
However, if it’s open already, it won’t route you to the correct target URL of the notification, like for example the post URL on a notification for a reply.
Probably an iOS incompatibility on the code at
First reported by @pmusaraj
Any update on this wrt to the evolving beta releases from Apple?
I have looked into this a bit, and so far it looks like this is a bug in iOS. See: 252544 – Initial ServiceWorkerWindowClient in a Home Screen web app launched to handle notificationclick handler is inert for a short period
They key piece there is probably this comment from Brady Eidson (Webkit engineer):
In my test case it’s working because I’m postMessaging to a new client opened via clients.openWindow
If I attempted to matchAll and reuse an existing window client, I would fall into this same trap.
Looks like Brady has a PR up for this as well: Initial ServiceWorkerWindowClient in a Home Screen web app launched to handle notificationclick handler is inert for a short period by beidson · Pull Request #11848 · WebKit/WebKit · GitHub, probably best to wait and see if this gets fixed upstream.
I believe this is fixed in the current version of iOS (16.5), I can’t repro the issue on my phone. Does that check out for you @Falco @merefield ?
This topic was automatically closed after 5 days. New replies are no longer allowed.