'GoogleMLKit/FaceDetection pod iOS crash

I am facing an issue when debugging the MLKit FaceDetection.

When the code detects a face it crashes

faceDetector.process(visionImage) { [weak self] (faces, error) in
            
            guard let self = self, error == nil else {
                return
            }
            // Detect Face
            guard let faces = faces, !faces.isEmpty, faces.count == 1, let face = faces.first else {}
}

enter image description here

This is the crash Precondition failed: NSArray element failed to match the Swift Array Element type Expected MLKFace but found MLKFace

Run the application by cable with debug scheme

I installed the latest version from below Pod pod 'GoogleMLKit/FaceDetection'



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source