Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1 Error and 1 Warning on Xcode 10.0 #11

Open
teytag opened this issue Oct 15, 2018 · 1 comment
Open

1 Error and 1 Warning on Xcode 10.0 #11

teytag opened this issue Oct 15, 2018 · 1 comment

Comments

@teytag
Copy link

teytag commented Oct 15, 2018

Hi @simonng ,

Error : Type 'CameraController' does not conform to protocol 'NSObjectProtocol'

screen shot 2018-10-15 at 9 44 04 pm

Warning : "'jpegPhotoDataRepresentation(forJPEGSampleBuffer:previewPhotoSampleBuffer:)' was deprecated in iOS 11.0: Use -[AVCapturePhoto fileDataRepresentation] instead."

screen shot 2018-10-15 at 9 46 18 pm

@diogodeoldata
Copy link

diogodeoldata commented Nov 25, 2020

public func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {
        if let error = error {
            self.photoCaptureCompletionBlock?(nil, error)
        } else if let imageData = photo.fileDataRepresentation(), let image = UIImage(data: imageData) {
            self.photoCaptureCompletionBlock?(image, nil)
        } else {
            self.photoCaptureCompletionBlock?(nil, CameraControllerError.unknown)
        }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants