Safari push notifications coming to macOS and iOS

Actually it seems really annoying and redundant to me - my device (Samsung Galaxs S21 / Chrome) already does have a back button that is always visible.
Agreed. Can there be an option to disable this on Android.
 
Actually it seems really annoying and redundant to me - my device (Samsung Galaxs S21 / Chrome) already does have a back button that is always visible.
Agreed. Can there be an option to disable this on Android.

You’ll get used to it.

We can only realistically gate this behind display-mode: standalone.

Some android devices don’t have a back button, some do. And doing any sort of user agent check is fragile.
 
I just bought an iPhone 14 to replace my old Samsung android phone. What do I do to get the push notifications on the iPhone?
 
In Safari, tap the share icon at the bottom of the screen.

In the menu tap “Add to Home Screen”. This installs the site as an app on your Home Screen.

Log in, go to Account > Preferences and enable.
 
As I mentioned elsewhere... for some this may not work on an existing iPhone that already had a desktop link created. Did this (and to the point of restarting the phone) several times and EVERY time it simply created a normal web browser link on my screen.
It only worked correctly after I signed out of iCloud, restarted the phone (this probably wasn't needed) and then signed back in. Once I did that, I was actually able to get the PWA app to work (and if I remember correctly, even before this there was a pwa=1 on the end of the URL).

@Chris D, I'm going to assume if you already have it enabled for your desktop use it will carry over to the PWA app also?
 
@Chris D i think there is a problem in the PWA. When the app is open, and I’m in a PM (not sure if it’s the same for a thread), and receive a notification that I get a new message, when I click on this notification, the page of the PWA doesn’t refresh.

I need to refresh manually to see the new message. I think every click on a notification should also trigger a page refresh so users can see the new content or else they will get confused.
Happens with posts/threads as well
 
Stop stop stop!

It’s not working! 🫨

I do not deserve your praise.

TBH it’s probably just the service worker being aggressively cached. Or my phone being weird again.

It will one day stop using the cached service worker, I’m sure.
 
were not worthy waynes world GIF


;)

Honestly @Chris D .. you are currently one of the lights of XF.. we may accept @Brogan into the lower echelons... but he has a LONG way to climb. He's on level 5 and you are around 10-12 (D&D reference for those who may not have had the joy of playing). :LOL:
 
In Safari, tap the share icon at the bottom of the screen.

In the menu tap “Add to Home Screen”. This installs the site as an app on your Home Screen.

Log in, go to Account > Preferences and enable.
I got the xenforo to work but when I go to do the same for my forum, the preferences says Push notifications not supported. It is grayed out as well.
How come
 
If you're a dev and you want this feature on your site today, you can achieve it with this simple class extension:
PHP:
class WebManifestRenderer extends XFCP_WebManifestRenderer
{
    protected function getDisplay(): string
    {
        $browser = $this->app()->request()->getBrowser();

        return $browser['browser'] == 'safari'
            ? 'standalone'
            : parent::getDisplay();
    }

    protected function getResponseBody(): array
    {
        $manifest = parent::getResponseBody();

        $manifest['orientation'] = 'portrait-primary';
        $manifest['id'] = $this->app()->router()->buildLink(
            'index',
            null,
            ['_pwa' => 1]
        );

        return $manifest;
    }
}
 
What’s the recommended approach for that? Is there a specific JavaScript event for PWA that we can listen for?
 
Just try making sure push notifications are enabled under preferences first.

This happened to me too and I'm not clear why. Although we do have some debug code logging push failures as that was something that was happening to me a while ago and then stopped but may be relevant again.
 
Sometimes even on Android I have to disable and re-enable push notifications on my sites to make them start working again. Even here I just didn't get one.
 
Top Bottom