In the plist setting "Privacy - Camera Usage Description", it shows a permission alert to allow or deny usage of the camera.
How can I get the alert's accept or refuse button event to do something? Here is my .plist file snapshot:
Request camera permission using
AVCaptureDevice.requestAccess(for: AVMediaType.video) { granted in }
and you'll get the user's response in the granted
parameter of the closure.