Enable and disable Developer ID apps and Gatekeeper

On macOS, only apps distributed through the App Store are allowed to open by default. Therefore, users may need to change their Security & Privacy settings to allow your Developer ID-signed app to launch. When testing your app, you can also enable and disable Gatekeeper, using the spctl(8) command-line utility.

Enable Developer ID-signed apps using Security & Privacy preferences

  1. In the Finder, launch System Preferences and select Security & Privacy.

  2. Click the lock button if it appears locked, and enter the administrator password.

  3. Select “App Store and identified developers.”

Enable and disable Gatekeeper using the spctl command

  1. In Terminal, enter the spctl command.

    To enable Gatekeeper, enter:

    $ sudo spctl --master-enable

    To disable Gatekeeper, enter:

    $ sudo spctl --master-disable
  2. Press Return.

  3. When prompted, enter your administrator password.

Check Gatekeeper status using the spctl command

  1. In Terminal, enter the following command:

    $ spctl --status
  2. Press Return.

    If Gatekeeper is enabled, the output of this command is:

    assessments enabled

    If Gatekeeper is disabled, the output of this command is:

    assessments disabled
See alsoDistribute outside the Mac App Store (macOS)Sign a Mac Installer Package with a Developer ID certificateTest a Developer ID-signed app