Using AVCapturePhotoOutput in iOS10 - NSGenericException
I am currently trying to figure out how to use iOS 10's AVCapturePhotoOutput method and am having trouble doing so. I feel like I am about to get it right but continue receiving an error: Terminating app due to uncaught exception 'NSGenericException', reason: '-[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] No active and enabled video connection' I have tried to put this line of code in either the AVCapturePhotoCaptureDelegate or my didPressTakePhoto function: if let videoConnection = stillImageOutput.connection(withMediaType: AVMediaTypeVideo) { videoConnection.videoOrientation =