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

[bug] iOS: `useiOSBroadcastExtension: false` ignored since 2.4.0, in-app capture unreachable

Aperta
#1,150 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
dart, flutter, ios
Ambito
mobile

Direzione di ricerca

Start in lib/src/participant/local.dart and trace how the effective ScreenShareCaptureOptions are chosen before the iOS broadcast branch; then read ios/Classes/BroadcastManager.swift to understand the missing-extension guard. Done means useiOSBroadcastExtension: false reaches in-app capture, while a requested broadcast flow without an extension reports an error rather than silently returning success. Check for existing screen-share tests before adding coverage.

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

Descrizione

Describe the bug

Since 2.4.0, setScreenShareEnabled(true) on iOS unconditionally routes into the Broadcast Upload Extension flow. ScreenShareCaptureOptions.useiOSBroadcastExtension still exists, but false (the documented in-app RPScreenRecorder mode through 2.3.6) has no effect.

lib/src/participant/local.dart (2.4.0–2.10.0 and current main):

if (lkPlatformIs(PlatformType.iOS) && !BroadcastManager().isBroadcasting) {
  // Wait until broadcasting to publish track
  await BroadcastManager().requestActivation();
  return null;
}

The branch precedes any capture options inspection; the in-app path below it is unreachable.

Worse, without an extension: requestActivation()'s native side (ios/Classes/BroadcastManager.swift) guard-returns when the RTCScreenSharingExtension Info.plist key is absent:

func requestActivation() {
    guard let bundleIdentifier = BroadcastBundleInfo.screenSharingExtension else { return }
    Task { await Self.showPicker(for: bundleIdentifier) }
}

No picker, no consent UI, no error, and no log so the call resolves null as success.

This appears to be an unintended side effect of #705 ("fix: Properly handle broadcast capture state"): the PR documents its async-return breaking change but never mentions useiOSBroadcastExtension or the in-app path. That capturer still works in flutter_webrtc, reachable via LocalVideoTrack.createScreenShareTrack() + publishVideoTrack() which is our current workaround.

Broadcast extension capture is always whole screen; in-app capture is scoped to the app's own UI. For privacy sensitive products (share this app with a support agent, never the user's other apps or notifications), app scoped capture is impossible through the public screenshare API on every released version.

To Reproduce

  1. Flutter app on a physical iPhone, livekit_client ≥ 2.4.0, no Broadcast Upload Extension target.
  2. Connect to a room, then:
    await room.localParticipant!.setScreenShareEnabled(
      true,
      screenShareCaptureOptions:
          const ScreenShareCaptureOptions(useiOSBroadcastExtension: false),
    );
    
  3. The call resolves (null); no consent UI, no published track, nothing logged. Remote participants receive nothing.
  4. On 2.3.6 the same code shows the ReplayKit consent alert and publishes an in-app screenshare track.

Expected behavior

  • useiOSBroadcastExtension: false (explicit or via RoomOptions.defaultScreenShareCaptureOptions) uses the in-app capturer, as through 2.3.6 . The gate should consult the effective capture options before routing to BroadcastManager.
  • Independently: when the broadcast flow is requested but RTCScreenSharingExtension is missing, fail loudly (throw or error event) instead of a silent null. Currently misconfiguration looks like success.

Platform information

  • Flutter version: 3.44.2
  • Plugin version: reproduced on 2.7.0 and 2.10.0 ; unchanged on main, 2026-08-04
  • Flutter target OS: iOS (real device, iPhone 17)
  • Flutter target OS version: iOS 26.4
  • Flutter console log: n/a, failure produces no output
Lingua principale
Dart
Stelle
421
Fork
260
Merge medio
2g 5h
PR unite (30g)
17

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 livekit/client-sdk-flutter

Tutte le issue di livekit/client-sdk-flutter

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.