From ce7a883ce81e735bf95b6d70455f1dde4c720afc Mon Sep 17 00:00:00 2001 From: Dominik Roessler Date: Wed, 16 Oct 2024 16:41:29 +0200 Subject: [PATCH] Remove cameraView from superview Remove from superview when camera subview is dismantled. Otherwise inputs on webview are broken after scanning. --- plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift b/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift index cde8d680..4b133d47 100644 --- a/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift +++ b/plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift @@ -170,6 +170,7 @@ class BarcodeScannerPlugin: Plugin, AVCaptureMetadataOutputObjectsDelegate { if self.captureSession != nil { self.captureSession!.stopRunning() self.cameraView.removePreviewLayer() + self.cameraView.removeFromSuperview() self.captureVideoPreviewLayer = nil self.metaOutput = nil self.captureSession = nil