Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Custom links to open directly on the app

Aperta
#8 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
mobile, web-dev

Direzione di ricerca

La issue descrive l'aggiunta di Web App Launch Handlers a una PWA. Inizia individuando il file manifest.json per aggiungere la proprietà launch_handler. Quindi, nel file JavaScript principale o nel service worker, implementa la launchQueue API per gestire i deep link in ingresso e navigare usando il router di Framework7. Esegui il test installando la PWA su Android/Chrome e verificando che i link aprano direttamente l'applicazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Web App Launch Handlers (specifically using the launch_handler and scope_extensions manifest properties).

Step 1: Add launch_handler to your manifest.json
Add the launch_handler key to control how the OS directs web link navigations to an existing or new instance of your PWA:

{
  "name": "My Framework7 App",
  "start_url": "/",
  "scope": "/",
  "display": "standalone",
  "launch_handler": {
    "client_mode": "focus-existing"
  }
}

Client Modes:

"focus-existing" (Recommended): If the PWA is already open, tapping the web link brings the existing app window to the focus and passes the URL navigation to it.

"navigate-new": Opens a brand new window of your PWA for that specific link.

Step 2: Handle Incoming Links in JavaScript (Optional)
If your app is already open and configured with focus-existing, capture the deep link target inside your Service Worker or main script using the launchQueue API:

if ('launchQueue' in window) {
  window.launchQueue.setConsumer((launchParams) => {
    if (launchParams.targetURL) {
      const url = new URL(launchParams.targetURL);
      console.log('Deep-linked URL path:', url.pathname);

      // Use Framework7 router to navigate directly to the requested screen
      if (window.app && window.app.views.main) {
        window.app.views.main.router.navigate(url.pathname);
      }
    }
  });
}

OS Platform Support Matrix

OS / Browser Auto-Open Behavior Notes
Android (Chrome/Edge) ✅ Supported Requires PWA to be installed via "Add to Home Screen" or WebAPK.
Windows / macOS (Chrome/Edge) ✅ Supported Chrome prompts the user once to "Open link in app?" and remembers choice.
iOS / iPadOS (Safari) ⚠️ Limited iOS Safari does not natively support deep link interception for PWAs added to the Home Screen. iOS users opening web links will hit Safari unless you use a native wrapper (like Capacitor) with Universal Links / Digital Asset Links.
Lingua principale
JavaScript
Stelle
0
Fork
0
Merge medio
1m
PR unite (30g)
13

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Absulit/sinpefacil

Tutte le issue di Absulit/sinpefacil

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.