I tried building Face ID-style unlocking for macOS with SwiftUI + Core ML
I've been messing around with SwiftUI and Core ML recently and ended up going down a bit of a rabbit hole.
I wanted to see if it was possible to make something that could recognize the user through the Mac's camera and use that for unlocking/protecting things, without sending the face data somewhere.
So I ended up building HeyMac.
The actual face detection part wasn't the most interesting bit. Getting the whole thing to behave nicely on macOS, dealing with false matches, camera availability, authentication, etc. was where most of the fun was.
It's completely open source, so I'm putting the repo here in case anyone wants to look at how I approached it or point out things I've done badly 😅
GitHub: https://github.com/iharshitmaurya/HeyMac
I'd especially appreciate feedback from people who have worked with Core ML or macOS security/authentication.
Posted Sep 28, 2026, 4:26 AM UTC