Skip to content

Add support for generating Progressive Web Apps #67

Description

@joebologna

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

Using fyne package -os web creates an index.html that cannot be installed as a PWA.

Is it possible to construct a solution with the existing API?

It is possible to hack the index.html and add files to the web application generated by fyne package -os web, but this is undesirable. A change to the packager is required.

Describe the solution you'd like to see.

Modify the packager to include a manifest.json, service-worker.js and update index.html to run the service-worker.js. This allows installing the PWA using the browser. The resulting PWA is a binary for the target platform that is generated by the browser itself. Of course, it still runs a captive browser in the application.

The proposed fix has an empty service-worker.js, which allows installing the PWA but the functions normally performed by the service worker, such as caching data and support for updates is not included in this enhancement. Adding a functional service worker requires consideration for what makes sense to support when running a WASM payload in a browser. This enhancement makes it possible for someone in the future to craft functional service worker based on features it should support. It will likely need someone expert in the construction of service workers for browser to design and implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions