I recently migrating Xcode 10.3 - 11.2.1, the project combination of Objective-C and Swift, I fixed most of the issue and finally I stuck in app-Swift.h file. It shows error "Cannot find protocol declaration for". Its working good in Xcode 10.2 not in Xcode 11.2.1
Kindly provide me an suggestion to fix this issue.
Swift Code Below
extension FaceScanHelper: AcuantHGLiveFaceCaptureDelegate {
func liveFaceDetailsCaptured(liveFaceDetails: LiveFaceDetails?) {
if(liveFaceDetails?.faceRect != nil && liveFaceDetails?.image != nil){
faceImage = liveFaceDetails?.image
let translatedFaceRect = self.calculateFaceRect(faceBounds: (liveFaceDetails?.faceRect?.toCGRect())!, clearAperture:(liveFaceDetails?.cleanAperture?.toCGRect())!)
var width = (translatedFaceRect.width)
width = 1.1*width
var height = (translatedFaceRect.height)
height = 1.3*height
let x = (translatedFaceRect.origin.x) + ((translatedFaceRect.width)-width)
let y = (translatedFaceRect.origin.y) + ((translatedFaceRect.height)-height)
let faceRect = CGRect.init(x: x, y: y, width: width, height:height)
self.faceOval?.removeFromSuperlayer()
faceOval = CAShapeLayer()
faceOval?.path = UIBezierPath.init(ovalIn: faceRect).cgPath
faceOval?.fillColor = UIColor.clear.cgColor
faceOval?.strokeColor = UIColor.init(rgb: APP_THEME_COLOR).cgColor //UIColor.red.cgColor
faceOval?.lineWidth = 5.0
self.videoPreviewLayer.addSublayer((faceOval)!)
if(liveFaceDetails?.isLiveFace)!{
if let face = liveFaceDetails?.image{
if(!isReported){
isReported = true
self.delegate?.liveFaceCaptured!(face, error: nil)
}
}
}
}else if(liveFaceDetails == nil || liveFaceDetails?.faceRect == nil){
self.faceOval?.removeFromSuperlayer()
}
}
}
See the Swift file method declaration on below the screenshot
See the errors list its below screenshot all in same app-Swift.h