Allow a warning about a person’s permission

My application (runs on iPhone X Simulator Xcode 9.0.1) asks me for permission to use Face ID.

The warning says:

Do you want to allow <appName> to use Face ID? This app was designed to use Touch ID and may not fully support Face ID.

I expected that some of the changes I made to the new APIs in the LocalAuthentication infrastructure (e.g. biometryType ) should have worked mainly for Face ID.

Is there anything else I need to do to get my app to fully support Face ID?

+5
source share
1 answer

It looks like you need to add NSFaceIDUsageDescription to your Info.plist in order to support Face ID.

In addition, the simulator warning is intended only for the simulator without this Info.plist key, the application, apparently, should crash on the real device without it.

Thanks to these dudes who helped me find out this - What is NSFaceIDUsageDescription - Person ID Use Description Key Info.plist?


Protection:

Before requesting permission, [LAContext canEvaluatePolicy:error:] returns YES for biometrics if the device is capable of this.

iOS will not ask the user for permission until the first call [LAContext evaluatePolicy:localizedReason:reply:] .

If the user does not grant permission, all future calls to canEvaluatePolicy return NO (error Code = -6 "The user refused to use biometrics for this application."). This is a strange nuance.

+7
source

Source: https://habr.com/ru/post/1272783/


All Articles