-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
p: local_authPlugin for local authentificationPlugin for local authentificationpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
Description
I upgraded to the latest local_auth and tried out the new routines .canCheckBiometrics() and then if true, .getAvailableBiometrics().
However, when I run on an iOS iPhone XR Simulator (for example) I am getting an empty array for the .getAvailableBiometrics() but the .canCheckBiometrics() returns true (as one would expect).
Here is the code (snippet):
else if (Platform.isIOS) {
deviceData = _readIosDeviceInfo(await deviceInfoPlugin.iosInfo);
_setiOSDeviceInfo();
// Do the Bio check
hasBiometrics = await localAuth.canCheckBiometrics;
print('[Device - init() IOS] - hasBiometrics is $hasBiometrics');
if (hasBiometrics) {
// iOS is a bit more complex since it can be either Touch or Face ID
List<BiometricType> availableBiometrics =
await localAuth.getAvailableBiometrics();
print('[Device - init() IOS] - Available Biometrics are:');
print(availableBiometrics);
if (availableBiometrics.contains(BiometricType.face)) {
print('[Device - init() IOS] - Found FaceID biometrics');
biometricType = 'Face ID';
} else if (availableBiometrics.contains(BiometricType.fingerprint)) {
print('[Device - init() IOS] - Found TouchID biometrics');
biometricType = 'Touch ID';
} else {
print('[Device - init() IOS] - Didn' 't find any biometrics??');
biometricType = 'Unknown';
}
}
}And the result of run (i.e. the debug) --
flutter: [Device - setiOS()] - machineName is iPhone XR
flutter: [Device - setiOS()] - machineType is x86_64
flutter: [Device - setiOS()] - SIM platform is iPhone10
1000 = 1;
}, (null) on <LAClient: 0x600003e96490>
flutter: [Device - init() IOS] - hasBiometrics is true
1000 = 1;
}, (null) on <LAClient: 0x600003e93160>
flutter: [Device - init() IOS] - Available Biometrics are:
flutter: []
flutter: [Device - init() IOS] - Didnt find any biometrics??
This works on Android just fine -- and real iOS devices connected to USB (or via TestFlight etc).
Am I missing something?
Metadata
Metadata
Assignees
Labels
p: local_authPlugin for local authentificationPlugin for local authentificationpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.