Skip to content
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

Warning for AVCaptureSession startRunning on Main Thread #329

Open
abdorizak opened this issue Sep 23, 2023 · 1 comment
Open

Warning for AVCaptureSession startRunning on Main Thread #329

abdorizak opened this issue Sep 23, 2023 · 1 comment

Comments

@abdorizak
Copy link

Dear @AmolGangadhare
Describe the bug
I encountered a warning in this barcode package related to the AVCaptureSession startRunning method being called on the main thread. The warning message advises that this method should ideally be called from a background thread to prevent potential UI unresponsiveness. -[AVCaptureSession startRunning] should be called from background thread. Calling it on the main thread can lead to UI unresponsiveness

To Reproduce
1- Integrate the Flutter barcode package into a Flutter application.
2- Utilize the package to initiate a barcode scanning process.
3- Observe the warning message related to AVCaptureSession startRunning being called on the main thread.

Expected behavior
The AVCaptureSession startRunning method should be invoked from a background thread to avoid any potential UI unresponsiveness.

Screenshots
Screenshot 2023-09-23 at 8 37 32 PM

Additional context
Flutter barcode package version: ^2.0.0
iOS version: iOS 17
Xcode version: Xcode 15

@ohhyungkwon
Copy link

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants