Outils pour utilisateurs

Outils du site


informatique:progressive_web_app_pwa

Ceci est une ancienne révision du document !


Progressive Web App (PWA)

Articles:

Tools

Online démos

Applications

mine: le_saviez-vous_sur_wikipedia

Techno

Installation

Pour installer un PWA sans passer par une compilation et publication sur un magasin d'application: “installer sur l'écran d'accueil”.

😩 L'event beforeinstallprompt n'est pas implémenté par Safari on iOS ni Firefox for Android → MDN browser_compatibility

Sans beforeinstallprompt il faut expliquer selon, la plateforme, comment Ajouter à l'écran d'accueil (Add to Home Screen aka A2HS)

  • Safari: To add PWA to the Home Screen, open the app in Safari on iOS, go to the Share menu, scroll down and tap “Add to Home Screen”.

Apple:

Doc:

Is your app installed?

Tools & libraries :

Linux Chrome

Button installation avec Chrome Linux

Android Chrome

Install Android Chrome étape 1 Install Android Chrome étape 2 Install Android Chrome étape 3 Install Android Chrome étape 4 Install Android Chrome étape 5

iOS Safari

Install iOS Safari étape 1 Install iOS Safari étape 2 Install iOS Safari étape 3 Install iOS Safari étape 4 Install iOS Safari étape 5

Push API / WebPush

L’implémentation Push API utilise un service tiers configuré et fourni gratuitement par l'éditeur du navigateur.

Voluntary Application Server Identification (VAPID) for Web Push 8292 9749

Voir chapitre “tools” pour la mise en œuvre.

Apple: un POST d'envoi de message sur web.push.apple.com donne un 403 Forbidden et reason:BadJwtToken avec le même code 😤 que pour Google et Mozilla qui eux fonctionnent. Après lecture attentive de Sending web push notifications in web apps and browsers :

BadJwtToken
The JSON web token (JWT) has one of following issues: The JWT is missing. The JWT is signed with the wrong private key. The JWT subject claim isn’t a URL or mailto:. The JWT audience claim isn’t the origin of the push service where you sent the request. The JWT expiration parameter is more than one day into the future.

WebAuthn

Web Authentication API (WebAuthn)

La démo WebAuthn fonctionne sur Android + Firefox, après avoir autorisé les Services Google Play à accéder aux fichiers (Storage). Thanks to Danny Moerkerke.

Android+Firefox : WebAuthn fonctionne sans besoin d'installer la page sur l'écran d'accueil de l'appareil.

Web Share

This API should not be confused with the Web Share Target API.

Propriétés de partage (aka Share Data) :

  • title
    • partage email : c'est l'objet de l'email
    • partage mattermost : pas utilisé 😞
  • text
  • url

ServiceWorker

Après tous les exemples rencontrés, la méthode d'inscription du ServiceWorker la plus aboutie: sw-registration.js de DannyMoerkerke (again! of course!) accompagné de son service-worker.js.

Développement

Le débugueur de Chrome/Chromium est plus pratique, mais il n'aime pas le certificat sans autorité reconnue (self-signed).

chromium \
 --ignore-certificate-errors \
 --unsafely-treat-insecure-origin-as-secure=https://code.devhost/ \
 https://code.devhost/dev/wikipedia-did-you-know/wikipedia-did-you-know.pwa/

Pour Firefox il faut lancer un autre outil avec Ctrl + Shift + J et sélectionner “multi-processus”.

Flutter integration

informatique/progressive_web_app_pwa.1751877941.txt.gz · Dernière modification : de cyrille

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki