- Create a new Xcode project with the Single View Application template and with name the TouchIDDemo.
- The demo app will be very simple; we will have a screen with only one button that will notify the authenticating user.
- Open Main.storyboard and change the layout of the screen to be as follows:
- Link an IBAction to the button in ViewController.swift to perform the logic of Touch ID authentication:
@IBAction func didClickOnAuthenticate(_ sender: Any) { }
- Add the following import statement at the top of the source file:
import LocalAuthentication
- In the action function, first add the following code to check whether Touch ...