XF 2.2 Progressive web app

Status
Not open for further replies.
Mobile app installation
Mobile first. We hear it again and again, and with over half of all web traffic coming from mobile devices, it's more important than ever to provide your mobile visitors with a great experience.

Of course, XenForo 2 is built on a fully responsive design that gracefully adapts to any display size and makes using XenForo a pleasure on all devices, but now we're taking it a step further by enabling any XenForo site to become a progressive web app.

Progressive web what?

Okay, let's back up a little. Imagine a technology that allows a web site to appear and behave like an app without having to produce native code for each platform, or go through any vendor's App Store equivalent.

Progressive web apps, or PWAs, aim to bridge the gap between websites and native applications on both mobile and desktop devices using a series of emerging web standards. Push notifications, a feature introduced in XenForo 2.1, are a popular example of one such standard. In XenForo 2.2, we're expanding our support for these standards by making XenForo installable, implementing more graceful offline handling, and adding support for the badging API.

Setting it up

It's important to note that, like push notifications, making full use of these features will require a few extra steps to set things up.

Additionally, as with push notifications, these features are only available on devices and browsers that fully support PWAs. Would you care to take a guess as to what the most notable exceptions might be? As you may have suspected, once again Safari on macOS and any iOS-based browsers are the culprits due to Apple's ongoing failure to implement industry standards. While Safari on both macOS and iOS does support graceful offline handling, it does not support installation or badging (more on that below) at this time.

We would encourage you to make your frustrations known in public by applying virtual tar and feathers to Apple employees online until they relent and get their act together... or at least voice your support for these standards by continuing to reach out to @webkit on Twitter or the webkit-help mailing list. Officially, the best place to communicate with Apple is via their product feedback channels, and presumably they won't be able to continue to ignore a deluge of feature requests for the same thing... 🤔

Requirements

To make full use of these features...
  • Your XenForo installation must be accessed over SSL / HTTPS
  • Your site must have a relatively short title of 12 characters or fewer
  • You must publish a pair of square icons for your site, one at 192px and another at 512px.

Setting a short title

Publishing a pair of icons

What do PWAs look like?

If your site meets the requirements, your visitors will automatically be given the option to install your 'app' on their device.

The precise details of the interface and the circumstances permitting installation can vary by browser and in some cases can depend on the degree of interaction with your site a user has had.

When browsing with Chrome on desktop or Android, the app can be installed via the address bar on both mobile and desktop devices. On supported mobile devices, we also display a conspicuous yet unobtrusive banner in the off-canvas menu.

Mobile app install banner
Mobile app installation

Desktop app installation

Once the app is installed, it is readily available in exactly the same way as a native app. On mobile devices, that means it can be opened via an icon on the home screen. On desktop devices, it can be opened by searching your system or even pinning the app to your taskbar or dock.

Mobile app home screen
Desktop app home screen

Some devices will display a splash screen while the app is being loaded. The splash screen is automatically generated from the icons and background color of your style.

Mobile app splash screen

For most devices, we set the app to display a minimal interface. The elements of this interface also vary by browser, but most importantly include navigation controls. For Android devices running Chrome, we are able to use the native pull-to-refresh and back-button navigation controls, so we do without any additional interface.

Mobile app
Desktop app

If a user tries to open or navigate the app without a proper network connection, we display a simple offline message.

Mobile app offline page
Desktop app offline page

Chrome-based apps recently introduced support for application badging, which allows the app to indicate unread messages or alerts directly on its icon.
We are hopeful more browsers will support the badging API in the future.

macos-badge.png
Desktop app badging (Windows)

Looking toward the future

The PWA specification and standards are constantly evolving. We will continue to monitor them as time goes on in order to always provide the best possible experience on all devices.
 
Yes. But assuming it's the site in your signature, I'd recommend calling it simply StrongFirst.
If I read the ACP's descriptions correctly, we could fill in Board Short Title. Our forum Title is now "The Forum" as which site it's on is clearly identified elsewhere on the forum home page. So would this mean that we'd have to make the regular title longer than 12 characters if we want the PWA to use the Short Title? <sigh>

Thank you.

-S-
 
You can set your Board short title to whatever you want, any length, up to a maximum of 12 characters. It's how it will appear if someone decides to install the PWA to their device. So, really, having the short title be StrongFirst makes the most sense. It doesn't matter what the normal (long) title is.
 
Given that I read this process doesn't work on Apple devices but does like Chrome, does that mean it won't work on Chrome on an Apple device? E.g., I am running Chrome on one of my two Mac laptops.

Thanks.

-S-
 
Great new about iOS!

On a side note - is there any customizing we can do on the PWA? One member is asking if we can add the last reply info like you see on the forum index page.
 
Given that I read this process doesn't work on Apple devices but does like Chrome, does that mean it won't work on Chrome on an Apple device? E.g., I am running Chrome on one of my two Mac laptops.
It does not work on Safari. On macOS, it will work on other browsers. On iOS, all browsers must use WebKit (Safari) under the hood, so it will not work on any browser.

On a side note - is there any customizing we can do on the PWA? One member is asking if we can add the last reply info like you see on the forum index page.
The PWA is no different from viewing the forum in a browser, so there is no difference in how you would apply customizations.
 
We're currently running an older version of Xenforo (2.1.4) and we're looking to update our software; is this something we'd have to install additionally, or is this just part of the core software when we update?
 
As long as you meet the requirements it will work out of the box.
  • Your XenForo installation must be accessed over SSL / HTTPS
  • Your site must have a relatively short title of 12 characters or fewer (there is a separate field for this)
  • You must publish a pair of square icons for your site, one at 192px and another at 512px
 
As long as you meet the requirements it will work out of the box.
  • Your XenForo installation must be accessed over SSL / HTTPS
  • Your site must have a relatively short title of 12 characters or fewer (there is a separate field for this)
  • You must publish a pair of square icons for your site, one at 192px and another at 512px

Thank you Brogan!
 
As long as you meet the requirements it will work out of the box.
  • Your XenForo installation must be accessed over SSL / HTTPS
  • Your site must have a relatively short title of 12 characters or fewer (there is a separate field for this)
  • You must publish a pair of square icons for your site, one at 192px and another at 512px
Rip, my site name is 14, can't shorten it. Anything I can do?
 
hm, ill need to see if I can find a way to shorten it that makes sense.
For Wondercafe2, we commonly use WC2 as shorthand for the site so I used that as the short name. I find most sites I'm on with longer names have a shorter "casual" name or nickname that members use. Is something like that an option?
 
@the1 there is some discussion about notifications in Safari in the thread linked below:
 
Are there some browsers on Android devices where the "Install the App" text won't display?

I am receiving mixed feedback from users on Android devices.
 
Changes done to the pwa? I suddenly have the browser top bar visible on my site own pwa. I haven't done any changes since yesterday, when it was not visible.

Screenshot_20230303_223430_Chrome.jpg
 
That's frustrating me as well. I have two XF 2.2 forums--one has been active for a while, and the other is a development installation. The latter shows up as an "app" on my phones. The other? Nope. Yet on a computer, they act as separate applications with no problem at all.

What I need to do is carefully compare the setup for both of these, and maybe if I find a difference between my two sites, I can drop a hint in here as to what might help with that. It'll be a couple of weeks until I get back home, though...
 
What is this meant to do exactly once we fill in the form?
Because if it's anything like tapatalk it won't be able to migrate to that program.
 
What is this meant to do exactly once we fill in the form?
Because if it's anything like tapatalk it won't be able to migrate to that program.
It's nothing like TapaTalk. What it basically does is allow (currently with Android) the user to place a "bookmark/app" shortcut on their mobile screen and the interface is a little cleaner than using a browser to access it (even though most functions of the browser is present). It's a cleaner way of allowing your users to access your site from a mobile device.


As to "what it is meant to do"... pretty sure that's well outlined in the description of this very HYS.
 
Last edited:
Status
Not open for further replies.
Top Bottom