Navigation Menu

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/b060d221443e62964a3228c7b56b747c to your computer and use it in GitHub Desktop.
Save hashaam/b060d221443e62964a3228c7b56b747c 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
AVCaptureDevice.requestAccess(for: .video, completionHandler: { granted in
if granted {
print("granted")
} else {
print("unauthorized")
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment