Toast: nothing shown on iOS while a view controller is presented over the webview

Aperta
#2,643 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Albermonte ci sta già lavorando.

Dal 25/11/2026.

  • #2644 di @Albermonte — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
ios, swift

Direzione di ricerca

Start with the iOS implementation of @capacitor/toast and the provided reproduction project, which shows the failure when a view controller is presented by @capacitor/browser. Compare the toast presentation path with the active view controller and use the reproduction steps to verify the behavior. Done means the toast appears over the presented controller; pull request #2644 is already open, so check its status before starting.

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

Descrizione

platform: ios

Bug Report

Plugin(s)

@capacitor/toast 8.0.1. Same code in 8.0.2-nightly-20261124 and 9.0.0-alpha.2.

Capacitor Version
💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 8.6.2
  @capacitor/core: 8.6.2
  @capacitor/android: 8.6.2
  @capacitor/ios: 8.6.2

Installed Dependencies:

  @capacitor/android: not installed
  @capacitor/core: 8.6.2
  @capacitor/ios: 8.6.2
  @capacitor/cli: 8.6.2

[success] iOS looking great! 👌
Platform(s)

iOS

Current Behavior

While a view controller is presented over the webview, Toast.show() shows nothing. In the repro that view controller is @capacitor/browser; an in-app browser plugin does the same. The promise resolves right away, and no toast shows after the view controller is closed either.

Expected Behavior

The toast shows on top of the presented view controller.

Code Reproduction

https://github.com/Albermonte/capacitor-toast-presented-vc-repro

  1. pnpm install && pnpm build && npx cap sync ios && npx cap run ios
  2. Tap "1. Show toast". The toast shows.
  3. Tap "2. Open Browser, show toast after 3s". After 3 s the app calls Toast.show(). No toast appears.
  4. Close the Browser. The page shows Toast.show() called at 3.1s, resolved at 3.1s. A long toast that is on screen resolves about 4 s after the call.
Other Technical Details

Xcode 27.2, iPhone 17 simulator, iOS 27.0.

Additional Context

Same problem as #2538, which was closed without a repro. Recording of steps 3 and 4: https://github.com/Albermonte/capacitor-toast-presented-vc-repro/blob/main/media/before.mp4

Lingua principale
Java
Stelle
688
Fork
690
Merge medio
16h 15m
PR unite (30g)
7

Preparare l'ambiente

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 ionic-team/capacitor-plugins

Tutte le issue di ionic-team/capacitor-plugins

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.