StandardCyborg / StandardCyborgCocoa

Everything you need for 3D scanning on iOS
https://www.standardcyborg.com
Other
143 stars 49 forks source link

Expose AVCaptureDevice authorizationStatus information #19

Closed irtemed88 closed 3 years ago

irtemed88 commented 3 years ago

This PR partially exposes AVCaptureDevice’s authorizationStatus information from within CameraManager to allow consumers to react accordingly.

Until now the only way to tell outside of StandardCyborgUI whether or not camera permissions had been granted was to query AVCaptureDevice directly. We expose a getter for this value inside of CameraManager and also add a hook so we may imperatively react to the starting of a camera session failing due to a denial of camera permissions. The latter case is useful if an application wants to update its UI and direct users to Settings for granting permission immediately after the authorization request has been denied.

irtemed88 commented 3 years ago

@jeffchuber - Going to go ahead and merge this since the changes are minimal. Let me know once you've had a chance to look if there's anything here that needs to be reviewed!