JamitLabs / JamitFoundation

JamitFoundation is a collection of useful concepts to enable composition oriented development with UIKit
MIT License
10 stars 5 forks source link

Fix dispatch queue crash in BarcodeScanner module #34

Closed fredpi closed 4 years ago

fredpi commented 4 years ago

This PR fixes a crash in the BarcodeScanner module.

If the user didn't agree to the camera usage, the captureSessionQueue would have been left in suspended state forever. As it is illegal to release a DispatchQueue in suspended state, the barcode scanner would crash on deinitialization.

This PR fixes the issue by resuming the captureSessionQueue just before the deinitialization.