
When testing your app, you can enable and disable Gatekeeper using the spctl(8) command-line tool.
To enable Developer ID-signed apps using System Preferences, go to Protect your Mac from malware.
In Terminal, enter the spctl command.
To enable Gatekeeper, enter:
$ sudo spctl --master-enableTo disable Gatekeeper, enter:
$ sudo spctl --master-disablePress Return.
When prompted, enter your administrator password.
In Terminal, enter the following command:
$ spctl --statusPress Return.
If Gatekeeper is enabled, the output of this command is:
assessments enabledIf Gatekeeper is disabled, the output of this command is:
assessments disabled