Skip to main content

References

This page contains references for possible error codes, object structure, etc. Most of this can be obtained from clicking into code via Xcode, but it is also provided here as a reference.

Errors

When an error occurs, unless otherwise specified it will be a FaceCameraError, which is a custom class that extends Error and wraps over IDCameraControllerBase.Error.

public enum FaceCameraError: Error {
case cameraPermissionDenied
case faceNotDetected
case manualCaptureNotAllowed
case initializationError
case photoCaptureError
case unknown(Error)

static func from(_ error: IDCameraControllerBase.Error) -> Self {
switch error {
case .cameraPermissionDenied:
return .cameraPermissionDenied
case .initializationError:
return .initializationError
case .faceDetectorError:
return .faceNotDetected
case .photoCaptureError:
return .photoCaptureError
case .platformNotAllowed, .error:
return .unknown(error)
@unknown default:
return .unknown(error)
}
}
}