yankodimitrov / SwiftPasscodeLock

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

Support for max number of attempts #13

Closed stannie closed 9 years ago

stannie commented 9 years ago

Add the option to specify the maximum number of attempts M to enter a PIN. If specified, and when this number of attempts M is reached, the App will be informed of this. In our app, we would e.g. erase the App data.

Nice to have: option to additionally specify the number of attempts N after which new PIN entry will be disabled for 2^(A-N+1) seconds - i.e. with exponential back off - where A is the current attempt.

yankodimitrov commented 9 years ago

In the new version you have an option to set the maximumInccorectPasscodeAttempts after the user reaches that number of incorrect passcode attempts a notification with name PasscodeLockIncorrectPasscodeNotification will be posted on the default notification center.

Thanks!