Steps to reproduce
1.Register Face ID on an iOS device.
2.Disable the Face ID permission for the app.
3. Call the _localAuth.getAvailableBiometrics() method in the app to retrieve the available biometrics.
4. It returns an empty list if the Face ID permission is not enabled for the app.
Tested in latest version: local_auth app package 3.0.1
If Face ID is already registered on the device but the permission is disabled for the app, getAvailableBiometrics() returns an empty list. In this case, it should return a non-empty result because Face ID is set up on the device. If Face ID permission is disabled for the app, how can I detect that it is disabled and prompt the user to enable it in the app settings?
How can I identify whether the permission is disabled specifically for the app?
Need urgent help on this.
Expected results
GetAvailableBiometrics() should return a non-empty list if Face ID is registered on the device, even when Face ID permission is not enabled for the app.
If Face ID permission is not enabled for the app, it should still return a non-empty list, and there should be an additional property in the local_auth API to check whether the permission is enabled or not.
Actual results
getAvailableBiometrics() returns an empty list if Face ID is registered on the device but the permission is disabled for the app.
If Face ID is not registered on the device, getAvailableBiometrics() also returns an empty list.
Code sample
Code sample
Future<bool> isBiometricAvailable() async {
try {
final List<BiometricType> available = await _localAuth
.getAvailableBiometrics();
if (available.isNotEmpty) {
return true;
}
} catch (_) {
// ignore and fall back to other checks
}
return false;
}
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
Flutter Doctor output
Doctor output
Steps to reproduce
1.Register Face ID on an iOS device.
2.Disable the Face ID permission for the app.
3. Call the _localAuth.getAvailableBiometrics() method in the app to retrieve the available biometrics.
4. It returns an empty list if the Face ID permission is not enabled for the app.
Tested in latest version: local_auth app package 3.0.1
If Face ID is already registered on the device but the permission is disabled for the app, getAvailableBiometrics() returns an empty list. In this case, it should return a non-empty result because Face ID is set up on the device. If Face ID permission is disabled for the app, how can I detect that it is disabled and prompt the user to enable it in the app settings?
How can I identify whether the permission is disabled specifically for the app?
Need urgent help on this.
Expected results
GetAvailableBiometrics() should return a non-empty list if Face ID is registered on the device, even when Face ID permission is not enabled for the app.
If Face ID permission is not enabled for the app, it should still return a non-empty list, and there should be an additional property in the local_auth API to check whether the permission is enabled or not.
Actual results
getAvailableBiometrics() returns an empty list if Face ID is registered on the device but the permission is disabled for the app.
If Face ID is not registered on the device, getAvailableBiometrics() also returns an empty list.
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]