LocalAuthentication Changes for Swift
LocalAuthentication
Added LAContext.invalidate()
Added LACredentialType [enum]
Added LAError.AppCancel
Added LAError.InvalidContext
Added LAError.TouchIDLockout
Added kLAErrorAppCancel
Added kLAErrorInvalidContext
Added kLAErrorTouchIDLockout
Modified LAContext
Declaration | |
---|---|
From | class LAContext : NSObject { func canEvaluatePolicy(_ policy: LAPolicy, error error: NSErrorPointer) -> Bool func evaluatePolicy(_ policy: LAPolicy, localizedReason localizedReason: String!, reply reply: ((Bool, NSError!) -> Void)!) var localizedFallbackTitle: String! var maxBiometryFailures: NSNumber! } |
To | class LAContext : NSObject { func canEvaluatePolicy(_ policy: LAPolicy, error error: NSErrorPointer) -> Bool func evaluatePolicy(_ policy: LAPolicy, localizedReason localizedReason: String, reply reply: (Bool, NSError?) -> Void) func invalidate() func setCredential(_ credential: NSData?, type type: LACredentialType) -> Bool func isCredentialSet(_ type: LACredentialType) -> Bool func evaluateAccessControl(_ accessControl: SecAccessControl, operation operation: LAAccessControlOperation, localizedReason localizedReason: String, reply reply: (Bool, NSError?) -> Void) var localizedFallbackTitle: String? var maxBiometryFailures: NSNumber? var evaluatedPolicyDomainState: NSData? { get } var touchIDAuthenticationAllowableReuseDuration: NSTimeInterval } |
Modified LAContext.evaluatePolicy(_: LAPolicy, localizedReason: String, reply: (Bool, NSError?) -> Void)
Declaration | |
---|---|
From | func evaluatePolicy(_ policy: LAPolicy, localizedReason localizedReason: String!, reply reply: ((Bool, NSError!) -> Void)!) |
To | func evaluatePolicy(_ policy: LAPolicy, localizedReason localizedReason: String, reply reply: (Bool, NSError?) -> Void) |
Modified LAContext.localizedFallbackTitle
Declaration | |
---|---|
From | var localizedFallbackTitle: String! |
To | var localizedFallbackTitle: String? |
Modified LAContext.maxBiometryFailures
Declaration | Introduction | Deprecation | |
---|---|---|---|
From | var maxBiometryFailures: NSNumber! | iOS 8.1 | -- |
To | var maxBiometryFailures: NSNumber? | iOS 8.3 | iOS 9.0 |
Modified LAError [enum]
Declaration | Protocols | Raw Value Type | |
---|---|---|---|
From | enum LAError : Int { case AuthenticationFailed case UserCancel case UserFallback case SystemCancel case PasscodeNotSet case TouchIDNotAvailable case TouchIDNotEnrolled } | Equatable, Hashable, RawRepresentable | -- |
To | enum LAError : Int { case AuthenticationFailed case UserCancel case UserFallback case SystemCancel case PasscodeNotSet case TouchIDNotAvailable case TouchIDNotEnrolled case TouchIDLockout case AppCancel case InvalidContext } extension LAError : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError { } extension LAError : Hashable, Equatable, __BridgedNSError, ErrorType, RawRepresentable, _ObjectiveCBridgeableErrorType, _BridgedNSError { } | Equatable, ErrorType, Hashable, RawRepresentable | Int |
Modified LAPolicy [enum]
Declaration | Raw Value Type | |
---|---|---|
From | enum LAPolicy : Int { case DeviceOwnerAuthenticationWithBiometrics } | -- |
To | enum LAPolicy : Int { case DeviceOwnerAuthenticationWithBiometrics case DeviceOwnerAuthentication } | Int |