velikanov / SwiftPasscodeLock

An iOS passcode lock with TouchID authentication written in Swift.
MIT License
199 stars 52 forks source link

Touch ID misbehaviour #23

Closed konnanl closed 8 years ago

konnanl commented 8 years ago

The case is:

  1. Set the passcode
  2. Inactive the app
  3. Back to the app
  4. Unlock with Touch ID
  5. Remove the passcode
  6. Inactive the app
  7. Back to the App

The expectation is normal use the app, however, a touch ID panel is there. Although I can press cancel and use the app normally, it should be a bug.

When looking into the Library, there should be a coding error in PasscodeLockViewController.swift in func authenticateWithBiometrics, it should also check the passcodeConfiguration.repository.hasPasscode. Please update the library, Thanks.

ziogaschr commented 8 years ago

Can you check if this is fixed in master with this commit https://github.com/velikanov/SwiftPasscodeLock/commit/e28236d45775acb9a709a6237dfe2c496d02f3cb?

In the app I am using it, we handle this differently in our subclass of PasscodeLockViewController

konnanl commented 8 years ago

Yeah....the code works! But it seems not sync in the cocoapod. I made a "pod update", the function still likes below.

private func authenticateWithBiometrics() {

    if passcodeConfiguration.shouldRequestTouchIDImmediately && passcodeLock.isTouchIDAllowed {

        passcodeLock.authenticateWithBiometrics()
    }
}
ziogaschr commented 8 years ago

This is not the main repo, so we can't update the cocoapod. Instead, you can put this in your Podfile pod 'PasscodeLock', :git => 'https://github.com/velikanov/SwiftPasscodeLock.git', :branch => 'master'