Why is my notarized and signed macOS .app rejected by Gatekeeper during installation?

I'm trying to distribute my macOS application (a .dmg file) to customers, and I've followed all the steps to sign and notarize the application. However, when I try to install the .dmg containing the app, Gatekeeper rejects it with the error "AppName cannot be opened because developer is not verified". Even though I’ve signed the app with my Developer ID, notarized it, and verified the signature using codesign, I am still encountering issues when attempting to install or open the app on a clean macOS environment. Here’s the error I see when using spctl to check the .dmg:

spctl --assess --type open --verbose=4 output/App.dmg output/App.dmg: rejected source=Insufficient Context

When trying:

spctl -a -t open -vvv --context context:primary-signature output/App.dmg

output/Unbounded.dmg: accepted source=Notarized Developer ID origin=Developer ID Application:

My .app is signed and notarised by electron builder and I explicitly signed and notarised dmg too but still not working

Answered by DTS Engineer in 814858022

Just to set expectations here, passing notarisation is necessary but not sufficient to pass Gatekeeper.

As to how why Gatekeeper is grumpy, my general advice is:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Its not .app, its .dmg

spctl -a -t open --context context:primary-signature -v ./output/Unbounded-0.0.1-arm64.dmg ./output/Unbounded-0.0.1-arm64.dmg: accepted source=Notarized Developer ID

but still gatekeeper reject and say Developer couldn't be verified

Just to set expectations here, passing notarisation is necessary but not sufficient to pass Gatekeeper.

As to how why Gatekeeper is grumpy, my general advice is:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Why is my notarized and signed macOS .app rejected by Gatekeeper during installation?
 
 
Q