Category: Ionic 4

Pattern cannot match values of type ‘LABiometryType’ in ionic project

I’m getting the following errors while building my ionic 4 app, This error came from a cordova plugin called cordova-plugin-fingerprint-aio , After a long research i fixed this issue by modifying the code in the plugin core files.

File location: src/ios/Fingerprint.swift

Actual code ( Swift )

switch(authenticationContext.biometryType) {
    case .none:
        biometryType = "none";
    case .touchID:
        biometryType = "finger";
    case .faceID:
        biometryType = "face"
}

Modified code

switch(authenticationContext.biometryType) {
	case LABiometryType.none:
	    biometryType = "none";
	case LABiometryType.typeTouchID:
	    biometryType = "finger";
	case LABiometryType.typeFaceID:
	    biometryType = "face"
}

The changes fixed the issues and app is working fine. You must remove and add the ios platform again to reflect the changes

PS: I’m not a Swift programmer and i won’t say that the above solution is perfect