According to this page PUSH API will be supported from ios 16.
https://webkit.org/blog/12945/meet-web-push/
And According to this page ios 16.4 and 16.5 are partial support.
https://caniuse.com/push-api
Noted: Notification Permission has been allowed successfully
Now I’ve used this function to test if my phone is support Web Push or not
function WebPushSupported()
{ if (!window.Notification)
{ return false;
}
if (!('serviceWorker' in navigator))
{ return false;
}
if (!('PushManager' in window))
{ return false;
}
return true;
}
Now I’ve test on my ios 16.5 (13 pro max)
The result :
- For safari browswer : return false
- For PWA app : Return true
So on PWA app I can get token normally and when I try to use that token to send message then on results I got the message_id , but I still could not get notification on PWA app.
Here is my test request
Could you guy tell me Does push API is supported on ios PWA or not? If yes Do I miss some flows or settings for PWA app?
2
Answers
Yes, web push using FCM are supported in ios PWA. I have them working in my PWA.
Have you implemented a service worker to process the push notifications?
Note: service worker are complex, and you will want to allocate some reasonable effort to get it properly working…
I’m struggling with this too. I’ve read you must follow these steps:
then,
When the user removes the app from the homescreen the permission is automatically revoked