Have a problem with usage of LocalAuthentication and support iOS 7.0
when I'm trying to
import LocalAuthentication
I'm getting crash if target iOS version is less than 8.0.
I tried to mark LocalAuthentication.framework as optional in the build phases and check class availability by calling:
var isTouchIDSupported: Bool {
if let contextClass: AnyClass = NSClassFromString("LAContext") {
return LAContext().canEvaluatePolicy(.DeviceOwnerAuthenticationWithBiometrics, error: nil)
}
return false
}
it do not crash if I comment LAContext() string like:
var isTouchIDSupported: Bool {
if let contextClass: AnyClass = NSClassFromString("LAContext") {
//return LAContext().canEvaluatePolicy(.DeviceOwnerAuthenticationWithBiometrics, error: nil)
}
return false
}
it crashes at the first seconds the app is launches if I accessing the any of LA class (LAContext for instance) in any place of my code. What I'm doing wrong here?
Console log for this crash:
dyld: Symbol not found: _objc_isAuto
Referenced from: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/lib/libobjc.A.dylib
in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation