mercari/QRScanner

Not handling authorization properly

piotrros opened this issue · 2 comments

When I run the app first time, I get didFailure twice with error:

unauthorized(__C.AVAuthorizationStatus)
unauthorized(__C.AVAuthorizationStatus)

and at the same time authorization alert shows up. When I tap "Deny" didFailure is not triggered anymore. It should not throw this errors before user makes a decision.

I had to handle authorization myself before using this library:

https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_ios

Not sure if it is iOS 14 thing or it was like this before.