Develop Mobile webapp - aliconnect/aliconnect.sdk GitHub Wiki

Hoe maak ik de app installeerbaar

  • The web app is not already installed
  • Meets a user engagement heuristic
  • Be served over HTTPS
  • Includes a manifest.json that includes:
    • short_name or name
    • start_url
    • display - must be one of fullscreen, standalone, or minimal-ui
    • prefer_related_applications must not be present, or be false
    • icons - must include a 192px and a 512px icon
  • Registers a service worker with a fetch handler

voorbeeld manifest.json welke wordt geplaast in de root folder /

{
  "name": "Aliconnect",
  "start_url": ".",
  "display": "fullscreen",
  "icons": [
    {
      "src": "/img/icon/icon-192x192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "/img/icon/icon-192x192.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ]
}

in de head sectie opnemen

<link href="manifest.json" rel="manifest" crossorigin="anonymous">

in aim minimaal opnemen library sw

<script src="https://aliconnect.nl/api/js/aim_debug.js"
        scope="name email"
        libraries="sw,web,om,getstarted,loadclient" >

openemen bestand /sw.js

// zie api/js/sw.js