2
[laContecxt evaluatePolicy:LAPolicyDeviceOwnerAuthentication
              localizedReason:@"My Reason to be displayed on face id prompt"
                        reply:^(BOOL success, NSError *error) {
                            if (success) {
                                // User authenticated successfully, take appropriate action
                            } else {
                                // User did not authenticate s  
                            }
                        }];

Hi I have used the same above method , Problem I am having is that the Localised Reason I am Providing is not shown

Where as in case of Touch Id it is shown Can you Help with this ?

I want to show some message on prompt as we can see on Touch Id with Localised reason.

Krunal
  • 77,632
  • 48
  • 245
  • 261

1 Answers1

2

It appears that the Face ID evaluation prompt does not make any use of the localizedReason parameter, but despite this it the parameter cannot be nil or empty. If you would like to customize the text that the Face ID privacy permissions prompt shows (once) in its message text, add a string value for the NSFaceIDUsageDescription key in your Info.plist file.

markedwardmurray
  • 523
  • 4
  • 10
  • If i am not wrong, NSFaceIDUsageDescription value is used when you grant permissions to app for first time. My case is when you already setup the authentication first time and then later when you want to use faceID for further authentication for login etc – deepak patil Apr 16 '18 at 10:32
  • Correct. When would be requesting Face ID access prior to login though? – markedwardmurray Apr 17 '18 at 14:45