iOS Swift Biometric Authentication(FaceID, touchID, Password-Pin).

Supplement your own authentication scheme with biometric authentication, making it easy for users to access sensitive parts of your app.

Add Privacy

Add Privacy NSFaceIDUsageDescription in info.plist file.
Privacy — Face ID Usage Description -Description.

Add LocalAuthentication framework

Add LocalAuthentication framework.

Image for post
Image for post

import LocalAuthentication

Image for post
Image for post

LocalAuthentication has contains.
import LocalAuthentication.LABase
import LocalAuthentication.LAContext
import LocalAuthentication.LAError
import LocalAuthentication.LAPublicDefines

Create Context and Authenticate.

let context = LAContext()

Before starting to authenticate do this process canEvaluatePolicy(_:error:)
Assesses whether authentication can proceed for a given policy.

var error: NSError?
guard context.canEvaluatePolicy(LAPolicy.deviceOwnerAuthentication, error: &error) else {
return print(error!)
}

Image for post
Image for post

Train a machine learning model to classify images, and add it to your Core ML app.

Open Create ML App. Xcode -> Open Developer Tool -> Create ML

Image for post
Image for post

Select a Template
Image -Image Classifier, Object Detector.
Sound -Sound Classifier.
Motion -Activity Classifier.
Text -Text Classifier, Word Tagger.
Table -Tabular Regressor, Tabular Classfier.

Image for post
Image for post

Select Image Classifier -> Next -> Fill Project Details like Project Name, Auther, Licence, Description. Now you will see below Screen.

Image for post
Image for post

Now Configure the input Training just drag and drop your Training Data or
Training Data-> Choose Files Add Training Data Folder

Image for post
Image for post

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store