Day 18: Swift macOS password manager for people who hate the cloud
Sean Walker
Posted on January 19, 2019
π
01/18/2019
π 12 days until launch
π₯ 17 day streak
π° $2.99 price (into cup of coffee territory now)
π€ $0 revenue
π 0 customers
βοΈ 23 hours spent
π» 78 files changed, 246992 insertions(+), 54 deletions(-) (insertions are including 3rd party code π¬)
π Today's goal: Touch ID support
5:05 PM
I keep racking up the hours on this thing!
5:30 PM
TouchID is surprisingly easy to do⦠here's the code
import LocalAuthentication
func showTouchID() {
let context = LAContext()
context.localizedCancelTitle = "Cancel"
context.localizedFallbackTitle = "Unlock with password"
var error: NSError?
if context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) {
let reason = "unlock AllYourPasswords"
context.evaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, localizedReason: reason ) { success, error in
if success {
// Move to the main thread because a state update triggers UI changes.
DispatchQueue.main.async { [unowned self] in
self.showPasswords()
}
} else {
print(error?.localizedDescription ?? "Failed to authenticate")
}
}
}
}
I'll probably do something else tonight because that was only 20 minutes⦠here's what it looks like:
I'll be back πΆ
Turns out I had a life tonight! What! See you tomorrow π
π πͺ π
π©
Sean Walker
Posted on January 19, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.