Here are list of steps to follow to set up Biometric Login (Face ID, Touch ID) for your Xamarin.iOS project.
- Before you begin, make sure you have a provisioning profile. If your organization has a provisioning profile you could use that, otherwise you can set up a free provisioning profile with this guide.
- Create a new or open existing Xamarin.IOS single view app. Then add BiometricAuthentication.cs class with following class and include ViewController.cs code snippet to your initial ViewController.cs. You can include required Authentication Success/Failure callback functions as shown in comments.
3. Make sure to add the Info.plist key NSFaceIDUsageDescription with any sensible string value.
4. If you are testing in simulator, make sure to Enroll Face ID/ Touch ID as shown below. The Application will load with either Face ID/Touch ID which is supported in device.
Enjoy the Biometric Login :’)