TouchID in Xamarin Forms

TouchID in Xamarin Forms for Android and iOS very simple to implement. Let’s start to implement Touch ID with Xamarin forms in only 4 easy steps.

 1. Create new Xamarin forms solution.
 2. Add Plugin.Fingerprint NuGet package

https://www.nuget.org/packages/Plugin.Fingerprint/ in all projects (portable, android and ios)

3. Permissions (Android only)

Allow user fingerprint required permission in AndroidManifeast

Add this line in MainActivity.cs to Initialize TouchID component before Init method. 

CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity);

4. Final code in MainPage.xaml.cs

Add this code in MainPage.xaml.cs on button click or where you need to enable your fingerprints touch Id, Same code also work with iPhoneX FaceId.

And that’s done, you can check the full source code here: https://github.com/manicoder/XamarinTouchId

Happy Coding, Cheers Coders 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *