From the course: Biometric Authentication for iOS in Swift
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
LocalAuthentication context
From the course: Biometric Authentication for iOS in Swift
LocalAuthentication context
- [Instructor] Now, if you navigate away from your P list and back to it, you notice it reorders it. So now, my Privacy - Face ID Usage Description is in a different place but of course, everything's fine, nothing's changed. We're great. So now we're going to look at actually including the local authentication code in our app. So I'm going to go to my View Controller, and I'm going to close the right pane for a little bit more real estate and now I'm going to import the local authentication framework. So, after line 9, I'll create a new line 10 and type, "import LocalAuthentication". So now I have access to all that powerful framework functionality. And on line 13 I'm going to create a new line and on line 14 type, "var context = LAContext". This will create an instance of the local authentication context for us. So I'm going to use the default initializer with an open-close paren, and add a blank line after that. Now, when the view did load, I'm going to set a couple of properties…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.