from Hacker News

Ask HN: How does Knock to unlock work?

by skycocker on 2/23/14, 12:59 AM with 1 comments

It's been bothering me for a few weeks now: how does Knock to unlock app work on the OS X side?

I read about authorization plugins like this NameAndPassword example: https://developer.apple.com/library/mac/samplecode/NameAndPassword/Introduction/Intro.html

After I managed to build and install it (which wasn't so easy: http://stackoverflow.com/questions/21582995/custom-login-lock-screen-in-os-x-mavericks) it won't log me in (more discussion here: http://stackoverflow.com/questions/21056322/customize-login-screen-mac-osx-sfauthorizationpluginview#comment33224960_21056322). With this happening and the documentation with examples being outdated, I think it's not the proper way to modify the lock screen today. Also, I guess it only works on the login/fast-user-switch screen, but not on the wake from sleep one. So basically my question is: how exactly does Knock modify the lock screen, and how is it possible to recreate this behavior with some other plugin? (I'm currently working on something like fingerprint scanner)

One user on SO wrote about some login agents: http://stackoverflow.com/a/21835312/2113110 - I've tried pre login agents, but I guess it's not the same thing.

  • by Jonovono on 3/6/14, 9:30 PM

    You are curious about something different than I was about Knock to unlock. I was wondering how they detect the knocking and not get false positives. I started working on a project that recognises knocks/taps (just incase anyone else comes here and is curious about this part!) https://github.com/Jonovono/Tapadoodledo