Distribution & release

Gatekeeper

The macOS security layer that checks an app's code signature and notarization before letting it open. The reason unsigned or un-notarized apps show scary warnings on first launch.

macOS GatekeeperGatekeeper check

Gatekeeper is the part of macOS that decides whether an app is allowed to launch. When a user opens an app for the first time, Gatekeeper verifies that it is signed with a valid Developer ID certificate, that Apple has notarized it, and that nothing has modified it since signing. Pass, and the app opens with at most a one-time confirmation. Fail, and the user sees a warning that the app is damaged, from an unidentified developer, or cannot be checked for malware.

When the check runs

Gatekeeper's full check is triggered by the quarantine flag. When a browser, AirDrop, or Messages saves a file, macOS tags it with the com.apple.quarantine extended attribute. The first launch of a quarantined app triggers the full assessment: signature, notarization ticket, and a malware scan. Apps installed through the Mac App Store are vetted by the store itself, so this is mostly a concern for apps you distribute directly.

What each failure looks like

"App is damaged and can't be opened"
The signature does not verify. Usually the app was modified after signing (a build script touched the bundle post-codesign), the signature is broken, or in older cases the zip round-trip stripped it.
"Cannot be opened because the developer cannot be verified"
Signed, but not notarized, or signed ad hoc or with a non-Developer ID certificate. Apple has no notarization ticket for it.
"From an unidentified developer"
No valid Developer ID signature at all.

Checking a build before shipping it

bash
# Full Gatekeeper assessment (what a user's Mac will do)
spctl --assess --type execute -vv MyApp.app

# Verify the signature and its chain
codesign --verify --deep --strict -vv MyApp.app

# See or remove the quarantine flag while testing
xattr -p com.apple.quarantine MyApp.app
xattr -dr com.apple.quarantine MyApp.app

The reliable pre-flight test is to zip the final build, download it over a real browser on a clean machine (so it gets quarantined), and launch it. That exercises the exact path a user hits.

Bypassing it is getting harder

For years the workaround for a blocked app was Control-click then Open. macOS Sequoia removed that shortcut: users now have to visit System Settings, then Privacy and Security, and approve the app there. In practice that means distributing an un-notarized macOS app to the public is no longer viable, and notarization is effectively mandatory for anything shipped outside the App Store.

FAQ

Common questions about Gatekeeper

Why does macOS say my app is damaged and can't be opened?

The code signature no longer verifies. Common causes: something modified the app bundle after codesign ran (build scripts writing into the bundle are the classic one), the app was signed ad hoc, or notarization was skipped. Run codesign --verify --deep --strict on the shipped artifact to see the real error.

How do I check if Gatekeeper will accept my app?

Run spctl --assess --type execute -vv MyApp.app on the final, notarized build. It prints accepted with source=Notarized Developer ID when everything is in order. For the true end-to-end test, download the build through a browser on another Mac and launch it.

Can users still bypass Gatekeeper?

Yes, but it is deliberately buried. Since macOS Sequoia the Control-click Open shortcut is gone; a blocked app has to be approved in System Settings under Privacy and Security. Asking customers to do that is a support burden, so shipping signed and notarized is the practical answer.

Does Gatekeeper apply to iOS apps?

No. Gatekeeper is macOS only. iOS enforces signing much more strictly at install time: an iOS device simply refuses to install an app whose signature and provisioning profile do not check out, so there is no equivalent warning to click through.

Keep reading

Related terms

Notice a definition that has drifted? Email support@hexsign.io and we'll update it. Browse the full glossary or jump to the help center.

Try HexSign

Know before a certificate or profile expires.

HexSign tracks every Apple certificate and provisioning profile and alerts you ahead of expiry. The Free plan covers tracking and alerts. Paid plans renew them for you.