[JoyFreak] Custom PWA

[JoyFreak] Custom PWA

No permission to download

JoyFreak

Well-known member
JoyFreak submitted a new resource:

Custom PWA - Make your PWA feel like a real app.

Find:
Code:
<link rel="manifest" href="{{ base_url('webmanifest.php') }}">

Replace:
Code:
<link rel="manifest" href="{{ base_url('webmanifest.json') }}">

Open file webmanifest.json with notepad:
Edit all areas that say "EDIT". It's pretty self explanatory and you can use the default webmanifest.php as guidance if you've set it all up in the Admin CP > Setup > PWA Setup. Just head over to your website and add /webmanifest.php at the end to get all the information to fill out...

Read more about this resource...
 
What is the difference of this thing? Can you provide some screenshots? If I do it can iOS users also use it too?
From the resource description:
The only thing changed between the two files is the "display". Having it as "standalone" will make the app feel like a real app, even on iOS and other devices.

It's actually effective on iOS so yes, iOS users can use it also. It will make the PWA feel like an app without the web browser action links.
 
From the resource description:


It's actually effective on iOS so yes, iOS users can use it also. It will make the PWA feel like an app without the web browser action links.

Nice! So without making it .json, if I just add display: standalone thing to my current PWA file will make it work or I need to use .json file?
 
From the resource description:

It's actually effective on iOS so yes, iOS users can use it also. It will make the PWA feel like an app without the web browser action links.
But my default install XF 2.2.1 already has this config.
Looking at your .json file it's identical to my /webmanifest.php also.

Not sure what is the difference.
 
But my default install XF 2.2.1 already has this config.
Looking at your .json file it's identical to my /webmanifest.php also.

Not sure what is the difference.
It’s a minor difference.
The only thing changed between the two files is the "display". Having it as "standalone" will make the app feel like a real app, even on iOS and other devices.
 
Oh here at xf.com, it's using
"display": "minimal-ui"
But mine already using standalone.
So then you don’t need it. By default it’s on minimal-ui. You or someone else must have changed it.

But having a separate file to make your changes is recommended. You can do a lot more like track how many users have downloaded your PWA. I might do a tutorial on that later.
 
So then you don’t need it. By default it’s on minimal-ui. You or someone else must have changed it.

But having a separate file to make your changes is recommended. You can do a lot more like track how many users have downloaded your PWA. I might do a tutorial on that later.
Actually that would be really cool. :D
 
Also worth noting: My site didn't have that line of code in the PAGE_CONTAINER template by default so if that's the case just throw rhem near the top in <head> tags.
 
So then you don’t need it. By default it’s on minimal-ui. You or someone else must have changed it.

But having a separate file to make your changes is recommended. You can do a lot more like track how many users have downloaded your PWA. I might do a tutorial on that later.
That would be great.
 
Is the json file respecting a user's choice for style? We have eight styles (four color variations of two different themes, XF default theme and a third party theme). In XF's implementation, the app's title bar and other attributes change when a visitor changes themes. These two lines:

Code:
    "background_color": "EDIT",
    "theme_color": "EDIT"

...make me think the theme might not be changed?

And, what values go in there? Hex or RGB?
 
Top Bottom