Get Camera Preview to AVCaptureVideoPreviewLayer
I was trying to get the camera input to show on a preview layer view. self.cameraPreviewView is tied to a UIView in IB Here is my current code that I put together from the AV Foundation Programming Guide. But the preview never shows AVCaptureSession *session = [[AVCaptureSession alloc] init]; session.sessionPreset = AVCaptureSessionPresetHigh; AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; NSError *error = nil; AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device error:&error]; if (!input) { NSLog(@"Couldn't create video