MxABC / swiftScan

A barcode and qr code scanner( 二维码 各种码识别,生成,界面效果)
MIT License
1.59k stars 325 forks source link

[AVCaptureSession startRunning] should be called from background thread. Calling it on the main thread can lead to UI unresponsiveness #119

Open viihua opened 1 year ago

viihua commented 1 year ago

image

viihua commented 1 year ago

Xcode14.1&iOS16.1.2

JJXYZ commented 1 year ago

我也碰到这个问题,还在研究中

viihua commented 1 year ago

我也碰到这个问题,还在研究中

Xcode14的警告,不在主线程调用就行

MZC0829 commented 1 year ago

XCode14.3 & iOS16.0 也提示这个

等待大佬加入这个 func start() { if !session.isRunning { isNeedScanResult = true DispatchQueue.global(qos: .background).async { self.session.startRunning() } } }

viihua commented 1 year ago

别用14.3打包,14.3运行的包,在iOS13上单独运行必崩。

MZC0829 commented 1 year ago

别用14.3打包,14.3运行的包,在iOS13上单独运行必崩。

好的好的,感谢提醒