Creating PWA in Awesome Apps

To add the support for the PWA for awesome app just do following steps:

  1. Create the awesome js app if not exitsts
  2. Add the sw-js module in the awesome-js app and paste the following code in it.

    1.  
    2. In this code cacheName is the version of the cache.
  3. Add the manifest file in the app module named as manifest-json and paste the following code in it

    1.  
  4. In the ‘init‘ module for core set the ‘Service-Worker-Allowed: /’ header, using

    you can also do this change directly on the server either in nginx.conf or .htaccess file.
  5. In the app scripts add the manifest file by using link tag like this

    1.  
  6. In the app scripts module register the service worker by using this code

    1.  

prerequisites

  1. Awesome Enterprise Version 1.3.2 and above
  2. icons in manisfest.json must include a 192px and a 512px sized icons, check other requirements to get Add to home screen prompt
Updated on Jun 19, 2021