SiriDx / qrcode

A flutter plugin for scanning QR codes. Use AVCaptureSession in iOS and zxing in Android.
MIT License
72 stars 47 forks source link

Check camera permission before starting session #8

Closed mhadaily closed 4 years ago

mhadaily commented 4 years ago

Make sure camera permission is authorized before running the camera, otherwise app will crash.

I am not too familiar to Objective-c but I did my best to get the permission status and check if camera is authorized before it runs the session. we run to an issue that if user denys camera permission, app immediately crashes.

It will look like this when there is no permission on iOS

I will glad to hear about this PR and learn more about it.

Thanks, Majid

sbd2015 commented 4 years ago

This also causing me a problem. Once I deny the camera permission and try to reaccess, app would crash on iOS. I tested on iPhone 5 and 7.