XF 2.2 PWA setup helper and Web share API

Not so long ago we showed you the new progressive web app functionality coming in XF 2.2 and since then we've added a couple of related bits which we are including as of XenForo 2.2 Beta 2.

pwa_helper_web_share_hys_01.png
PWA setup helper​

localhost_22x_admin.php_pwa_ (1).pngThere are a number of requirements you need to meet before a PWA becomes installable by most browsers. Some of these requirements are server config related, others are options, some are language based and some are style based.

While they're not particularly strenuous, we thought it would be worth highlighting all of these requirements in one place to make the process of setting up your PWA even easier.

To check if your forum meets the requirements to be installable as a progressive web app you now just need to head over to Admin > Setup > PWA setup.

Once complete the PWA will now be installable on supported browsers.

Web share API​


While not directly related to PWAs this is another modern web API that aims to bridge the gap between web apps and native apps by leveraging native device features. The Web share API allows your users to share content from your forum using the native device "share sheet" built into their devices. This one is even supported by iOS! 😱

Instead of us rendering the typical share icons in various places like these:

pwa_helper_web_share_hys_03.png


We instead display a single share control:

pwa_helper_web_share_hys_04.jpeg


And where we display the content-specific search icon, such as in the top right corner of posts, tapping it no longer displays the search tooltip.

Tapping the share button opens up the default experience for sharing content on your device. Most apps on most devices will extend the default share sheet meaning in just a few taps your users can be sharing your content with their friends/colleagues via whichever native app they have on their devices.



pwa_helper_web_share_hys_05.jpeg pwa_helper_web_share_hys_06.png



In other PWA related news we have also added a new style property.

web_share_07.png


This property allows you to indicate whether the icons you have provided are sufficiently padded enough to enable them to be cropped for various device icon styles. For example, it means your icon can be cropped to a circle so it appears nicely on Android devices without cropping anything out of your icon.

In most cases if you do not verify your icons are maskable they will usually be shrunk to fit the "safe area" but this may not look optimal so it's worth doing.

You can read more about maskable icons here and you can use this tool to help test and verify your icons are maskable.
 
Hmm?

View attachment 232255

This is how PWA does look on the iPhone, so there are navigation buttons, but you could also use edge-based swiping.

That is not PWA but in Safari browser in traditional web site mode. If you tap the share button and save to the home screen you'll be in PWA mode. Here is the side by side:

 
I'm still trying to find the difference between a member adding a bookmark (via Add toHome page) and installing the PWA app
They both give you an App Icon!
What else?
So, You didn't read the "web share" section in the first post of this thread?

It's not just an app icon. it installs as a completely new app, you can even uninstall it. Some browsers and platforms do not support that feature but in android and chrome, you install the app as a new app. not just a bookmark.
So you get push notifications to that specific app.
 
Back
Top Bottom