Search code examples
iosxmlinfo.plist

In the Info.plist, <string></string>


I added the following text to the Info.plist in an attempt to implement biometric authentication:

<key>NSFaceIDUsageDescription</key>

However, I encountered an error. So I made the following modification:

<key>NSFaceIDUsageDescription</key>
<string>Why is my app authenticating using face id?</string>  /* add */

Why is the text enclosed in <string></string> necessary?


Solution

  • A plist file is a file that contains key-value pairs. Each system key has a different purpose. i.e. UIMainStoryboardFile determines the main.storyboard, etc. In your case, it's for a permission request, specially biometric. You have to provide a value for this key which will show up as a message on the permission alert. Check this document below:

    https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW75

    enter image description here