Home > Apple > Mac

The command to allow apps past Gatekeeper [Without Disabling it]

In this guide, we will make you aware of the command to allow apps past Gatekeeper, without actually disabling it. This runtime protection mechanism makes sure that only trusted apps run on your Mac, thereby preventing malicious apps and malware from entering your PC. However, there are a few instances wherein the Gatekeeper tends to be over-protective and doesn’t allow the entry of genuine apps.

This has been the case mostly with the development and debugging apps. So, if you are also planning to run such apps but the OS isn’t letting you do so, then there are two ways out: either disable the Gatekeeper completely or make an exception for your app and make Gatekeeper allow you to install it. The first method might prove to be a risky approach and hence isn’t the recommended one. So in this guide, our focus will be on the second one.

What is the Command to Allow Apps past Gatekeeper [Without Disabling it]

ommand to allow apps past Gatekeeper

Taking Xcode 14 as an example, here’s the code that you need to run in the Terminal window: [make sure to change the app’s name and its location accordingly in the below command]

sudo spctl --add --label "Xcode14" /Applications/Xcode14.app
sudo spctl --enable --label "Xcode14"

That’s it. This command will allow apps past Gatekeeper, without actually disabling it. However, if for some reason, you want to disable the Gatekeeper completely, then use the following command:

sudo spctl --master-disable

Likewise, if at any point in time, you want to re-enable it, then use the below command:

sudo spctl --master-enable

UPDATE for macOS Tahoe

It has come to our notice that the above commands to allow apps past Gatekeeper isn’t working in the latest iteration of the OS, macOS Tahoe. While we can’t say whether it’s just a bug in the beta build or Apple has removed this functionality, but for now, your only way out is to take the risky approach of disabling the Gatekeeper altogether [as explained above].


Share: