Gatekeeper is a macOS security feature that ensures only trusted software runs on your system.
When triggered, Gatekeeper may display messages like:
“App can’t be opened because it is from an unidentified developer.”
“App is damaged and can’t be opened.”
(even when it's not)Use with caution! Disabling Gatekeeper removes an important layer of macOS security.
sudo spctl --master-disable
To check the current Gatekeeper status:
spctl --status
To re-enable Gatekeeper:
sudo spctl --master-enable
If you're developing or testing apps locally, you can sign your binaries to avoid Gatekeeper blocks:
codesign -s "Local Dev Cert" /path/to/your/app
sudo codesign -s "My Dev ID" /path/to/your/app