gitmyhub

BLEUnlock

Swift ★ 4.1k updated 2y ago

Lock/unlock your Mac with your iPhone, Apple Watch, or any other Bluetooth LE devices

BLEUnlock is a free Mac menu-bar app that automatically locks your computer when your iPhone or Apple Watch leaves Bluetooth range, and unlocks it when you return, no password typing required.

SwiftBluetooth LEmacOS Keychainsetup: easycomplexity 2/5

BLEUnlock is a free Mac utility that automatically locks and unlocks your computer based on whether your iPhone, Apple Watch, or another Bluetooth device is nearby. The idea is that when you walk away from your desk with your phone in your pocket, your Mac locks itself. When you return and your phone is close again, it unlocks without requiring you to type a password.

The app sits in the menu bar and works by monitoring the Bluetooth signal strength of a paired device. You can configure how close the device needs to be before it triggers a lock or unlock, and how long to wait before locking after the signal disappears (to avoid false triggers if you briefly step away). There is also an option to wake the display from sleep automatically when your device approaches.

A few other behaviors can be turned on: the app can pause music or video when you lock and resume it when you return, it can turn off the screen when locking, and it can run a custom script whenever a lock or unlock event happens. Your login password is stored in the Mac's Keychain, which is the system's secure password storage.

Setup requires granting a few permissions: Bluetooth access, Accessibility (so the app can interact with the lock screen to type your password), and Keychain access. The README includes troubleshooting steps for common problems, such as the device not appearing in the scan list or Bluetooth conflicts with keyboards and mice.

One technical note the README covers is MAC address stability. Bluetooth Low Energy devices sometimes change their identifier periodically for privacy reasons. Apple devices signed into the same Apple ID as the Mac resolve to a stable identifier, which is why iPhones and Apple Watches work reliably. Non-Apple devices with rotating addresses may not work.

Installation is available through Homebrew or by downloading directly from the GitHub releases page. The app is distributed for free and is not on the Mac App Store.

Where it fits