-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hang Risk warning from Xcode in CBScanner.swift #66
Comments
There is explicit guidance by Apple to not call startRunning on the main thread though. See the text in the yellow box: https://developer.apple.com/documentation/avfoundation/avcapturesession?language=objc This suggests you shouldn't call it on the main thread. |
That's why I request a pull of the modification. |
Except in CBScanner.swift from third-party barcode scanner, issue is open: heart/CarBode-Barcode-Scanner-For-SwiftUI#66
Sorry I would like to know will this issue be fixed? This thread would help, just add async background dispatch queue, right? |
Xcode warns on this line:
uiView.session?.startRunning()
-[AVCaptureSession startRunning] should be called from background thread. Calling it on the main thread can lead to UI unresponsiveness
The text was updated successfully, but these errors were encountered: