How to Disable Gatekeeper Prompts on MacOS
Shut the fuck up and show me the command
I'm and adult, let me run my own code! 😠
When developing apps on macOS, be it flutter, or whatever, or downloading unsigned binaries or such,
Gatekeeper can be a massive pain — throwing up prompts or blocking launches entirely. This is especially annoying when
building and running unsigned .app
bundles repeatedly during development.
Instead of clicking “Open Anyway” each time, you can make macOS chill out by removing the quarantine flag or — if you're on a sacrificial dev machine — disable Gatekeeper entirely.
Disable Gatekeeper prompts for a specific app
Once you've manually opened an app (via right-click > Open), macOS stores an exception for that specific binary path. But this is reset if:
- The app binary changes (rebuilt)
- The bundle path changes
- You clear quarantine flags
To skip the prompt every time:
🛠 Remove the quarantine flag:
xattr -d com.apple.quarantine /path/to/your/app
Recursively, for bundles:
xattr -rd com.apple.quarantine ./build/macos/Build/Products/Debug/your-flutter-app.app
You'll need to do this after every rebuild if the binary is regenerated.
So its basically useless, but good to know i guess...
Disable Gatekeeper globally (☣️ Nuclear Option)
On an isolated dev machine, you can kill Gatekeeper:
sudo spctl --master-disable
This enables the “Anywhere” option in System Preferences > Security
.
To re-enable:
sudo spctl --master-enable
Done, one less thing to deal with.