Taking photo with custom camera iOS 11.0 Swift 4. Update error
问题 I have a custom camera in my app and it worked fine, but after the new update I am getting this error: 'jpegPhotoDataRepresentation(forJPEGSampleBuffer:previewPhotoSampleBuffer:)' was deprecated in iOS 11.0: Use -[AVCapturePhoto fileDataRepresentation] instead. This is the line where I'm getting that error: guard let imageData = AVCapturePhotoOutput.jpegPhotoDataRepresentation(forJPEGSampleBuffer: photoSampleBuffer, previewPhotoSampleBuffer: previewPhotoSampleBuffer) else { return } This is