You are having problems using LocalAuthentication and support for iOS 7.0
when i try
import LocalAuthentication
I get a crash if the target iOS version is less than 8.0.
I tried to mark LocalAuthentication.framework as optional in the build steps and check the availability of the class by calling:
var isTouchIDSupported: Bool { if let contextClass: AnyClass = NSClassFromString("LAContext") { return LAContext().canEvaluatePolicy(.DeviceOwnerAuthenticationWithBiometrics, error: nil) } return false }
it does not crash if I comment out the LAContext () line, for example:
var isTouchIDSupported: Bool { if let contextClass: AnyClass = NSClassFromString("LAContext") { //return LAContext().canEvaluatePolicy(.DeviceOwnerAuthenticationWithBiometrics, error: nil) } return false
}
it crashes in the first seconds when the application starts if I access any of the LA classes (e.g. LAContext) anywhere in my code. What am I doing wrong here?
Console log for this failure:
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
source share