Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A2HS for mobile and desktop #115

Open
gedw99 opened this issue Oct 4, 2021 · 8 comments
Open

A2HS for mobile and desktop #115

gedw99 opened this issue Oct 4, 2021 · 8 comments

Comments

@gedw99
Copy link

gedw99 commented Oct 4, 2021

A2HS allows users would be able to install the app onto their Desktop and Mobile.

Its great because it bypasses the App Stores, but gives a App Store like experience. For example it adds a Icon to your Desktop or Mobile home screen. And because it uses service worker it self updates.

I have used this with golang apps.

Here is an example in golang: https://github.com/maxence-charriere/lofimusic
And the demo: https://lofimusic.app/

IOS Safari video demo for install:

lofimusic_a2hs_480.1.mov

I also tried it in IOS Chrome and Safari, but for some reason there is no ability to instal it.
I know it can be done because i have done it with flutter web... I suspect that loki may not everything setup correctly.

If i get more info on this, i will update it here.

@jech
Copy link
Owner

jech commented Oct 6, 2021

It's described here: https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Add_to_home_screen

Implementing that is a simple matter of:

  • designing an icon;
  • adding a Manifest file;
  • adding a service worker that does nothing;
  • adding a discrete button somewhere (where?).

The icon should obviously be a cube (that's what galena crystals look like, see https://en.wikipedia.org/wiki/Galena). Writing a manifest file should be pretty easy. I'm not too keen on service workers, they're a major privacy violation, but adding one that does nothing should not cause any major trouble.

I'll wait a couple of weeks for people to give opinions.

@gedw99
Copy link
Author

gedw99 commented Oct 7, 2021

Here is an example: https://github.com/boratanrikulu/quik.do :)

@gedw99
Copy link
Author

gedw99 commented Oct 7, 2021

Also this should be turned on : boratanrikulu/quik@0f8e531

It now works on IOS but did not back then. THats my own understanding, And i have not recompiled it yet and deployed it to check it.

@gedw99
Copy link
Author

gedw99 commented Oct 7, 2021

also in what way are they a privacy violation ? Curious as i am also concerned about it.

@jech
Copy link
Owner

jech commented Oct 8, 2021

This is a little off-topic, but service workers have two properties that make them dangerous:

  1. a service worker applies to a whole origin;
  2. service workers persist across browsing sessions.

Suppose you combine galene and Jitsi into a single web site (for example by using a reverse proxy). Then you visit https://www.example.com/galene/, which installs a service worker. The service worker is valid for the whole origin https://www.example.com. A week later, you visit https://www.example.com/jitsi/, then the service worker installed by Galene can intercept all requests that go to the jitsi hierarchy.

@gedw99
Copy link
Author

gedw99 commented Oct 8, 2021

thanks . makes total sense. appreciate it.

@jech
Copy link
Owner

jech commented Oct 6, 2024

Related to #216.

It also looks like recent versions of Chromium do not require a PWA to have a service worker, just a manifest file. https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable

@gedw99
Copy link
Author

gedw99 commented Oct 8, 2024

Related to #216.

It also looks like recent versions of Chromium do not require a PWA to have a service worker, just a manifest file. https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Making_PWAs_installable

Oh things are getting easier for users :)

I need to cross test ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants