Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use of unresolved identifier 'LAContext' in Swift 3

Apple claims to have this class in their arsenal LAContext, but Xcode 8.1 tells me otherwise: Use of unresolved identifier 'LAContext'

My line of code is as follows:

let context = LAContext()

To me this line of code doesn't seams to crazy ;), all the tutorial on-line make use of this no problem to check if TouchID is enabled, but in my Xcode, this is not the case.

What am I missing?

like image 845
David Gatti Avatar asked Nov 29 '16 16:11

David Gatti


1 Answers

You need to import the LocalAuthentication framework which contains this class and other related functionality.

import LocalAuthentication
like image 178
Scriptable Avatar answered Nov 19 '22 06:11

Scriptable