skip to Main Content

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

enter image description here

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


  1. 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?

    1. I suggest using Google Worbox for the core of the service worker
    2. Follow this guide to integrate FCM

    Note: service worker are complex, and you will want to allocate some reasonable effort to get it properly working…

    Login or Signup to reply.
  2. I’m struggling with this too. I’ve read you must follow these steps:

    1. Open Safari settings –> Experimental Features –> Push API

    then,

    1. Open the website your want permissions for in Safari
    2. Share –> Add to Homescreen
    3. Then open the app from your homescreen
    4. Click your app’s button to subscribe to push
    5. Accept

    When the user removes the app from the homescreen the permission is automatically revoked

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search