DEV Community

Kishor Gaikwad
Kishor Gaikwad

Posted on

I built a native macOS CoreAudio microphone kill-switch in Swift

macOS shows an orange dot in the menu bar when an application is already listening to your microphone—but by the time you see it, your audio input is already active (or your Bluetooth headphones have already switched into muffled Hands-Free Profile mode).

I built MicShield, a ~2 MB native Swift menu bar utility that acts as a hardware-level CoreAudio kill-switch for your Mac's microphone.

MicShield Banner

How It Works Under the Hood

  1. CoreAudio HAL Enforcement (kAudioDevicePropertyMute): MicShield locks all audio input devices at the hardware abstraction layer. If a background Electron app or browser tab attempts to unmute the input channel, MicShield intercepts the property change listener within milliseconds and re-locks the hardware mute state.
  2. Smart Auto-Allow for Real Meetings: Nobody wants to manually toggle their mic lock 10 times a day. When Smart Auto-Allow is enabled, MicShield detects when you actually join an active call in Zoom, Microsoft Teams, Google Meet, Cisco Webex, FaceTime, or Slack Huddles, unlocks the mic for the duration of the call, and automatically re-locks it the second you hang up.
  3. Camera Notch HUD & Global Hotkey: Includes a MacBook notch status indicator and a global Cmd + Shift + M kill-switch shortcut.
  4. 100% Offline & Localized in 7 Languages: Zero analytics, zero telemetry, notarized by Apple, and localized in English, German, Japanese, French, Spanish, Simplified Chinese, and Brazilian Portuguese.

Try It Out


bash
  brew install kishorgaikwad2016/tap/micshield

Pricing: Free 7-day full trial, then a $9.99 one-time lifetime license (Dodo Payments Checkout
 — no subscriptions).
Enter fullscreen mode Exit fullscreen mode

Top comments (0)