Skip to content

Instantly share code, notes, and snippets.

@hashaam
Last active August 16, 2020 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hashaam/2101c4d72cc24bf36da6713e05be7ec0 to your computer and use it in GitHub Desktop.
Save hashaam/2101c4d72cc24bf36da6713e05be7ec0 to your computer and use it in GitHub Desktop.
// Youtube: https://www.youtube.com/watch?v=7AlZxClmhPw
// Source: https://hashaam.com/2020/07/30/creating-camera-application-with-avfoundation/
import AVFoundation
let status = AVCaptureDevice.authorizationStatus(for: .video)
switch status {
case .authorized:
print("authorized")
case .notDetermined:
print("authorization not requested yet")
default:
print("authorization denied")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment