When compiling my Application with Xcode 9 for IOS11 I get the following warnings:
warning: 'touchIDLockout' was deprecated in iOS 11.0: use LAErrorBiometryLockout
warning: 'touchIDNotEnrolled' was deprecated in iOS 11.0: use LAErrorBiometryNotEnrolled
warning: 'touchIDNotAvailable' was deprecated in iOS 11.0: use LAErrorBiometryNotAvailable
I'm using touchID but I'm not using touchIdLockout...cste and the touchID is working correctly.
How can I remove these warnings?
Edit (not by the original author):
I tracked this down to a single cause. It's enough to reference LAError from the LocalAuthentication framework in my code to make these warnings appear.
Steps to reproduce (tried in Xcode 9.2):
- Create a new iOS app (Single View template). Note the iOS Deployment Target is set to iOS 11.2.
Add these lines to
AppDelegate.swift:import LocalAuthenticationAnd a single line in
appDidFinishLaunching:func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { let _: LAError? = nil return true }Build the app.
The let _: LAError? = nil line is enough to make the three warnings appear. The warnings are not associated with any particular line of code, though. They appear in the build log without any file/line reference:
<unknown>:0: warning: 'touchIDLockout' was deprecated in iOS 11.0: use LAErrorBiometryLockout
<unknown>:0: warning: 'touchIDNotEnrolled' was deprecated in iOS 11.0: use LAErrorBiometryNotEnrolled
<unknown>:0: warning: 'touchIDNotAvailable' was deprecated in iOS 11.0: use LAErrorBiometryNotAvailable
Here's a screenshot: Screenshot of the warnings in Xcode
And a sample project: Sample project for download (Xcode 9.2)
For reference, I reported this to Apple. Radar #36028653.