first, I want to state that I've been researching between push notifications and web notifications but I'm a bit confused.
I've read that push notifications for PWAs don't work for iOS (iPhones) on Safari from here: Sending Push Notifications to iOS from PWA
However does it mean that they work if the iPhone user is using Chrome? Or push notifications don't work for PWAs in iPhones on any browser?
This brings me to web notifications. Do web notifications work for PWAs in the background? My question is are web notifications a good enough substitute for push notifications or is it that Web notifications cannot be triggered by a server and thus push notifications are still necessary?
Do web notifications work for PWAs in the background?
Yes, they work in background, even when the website is closed, thanks to service workers.
When a push signal is received, the service worker is activated and a JavaScript callback is invoked.
are web notifications a good enough substitute for push notifications
Web notifications, together with the W3C Push API, that delivers the messages in background, are real push notifications, that can be delivered even when a website is closed.
is it that Web notifications cannot be triggered by a server and thus push notifications are still necessary?
Yes, web push notifications can be triggered in background, from your server, using the Push API and WebPush protocol.
does it mean that they work if the iPhone user is using Chrome?
Currently (Q1 2021), iPhone doesn't support web push on any browser.