It fails:
Code Block bash-3.2$ spctl -a -t open --context context:primary-signature -v MyApp.dmg MyApp: rejected source=no usable signature
However this DMG installs fine on Big Sur 11.2.2, macOS allows to run this app, and checking of notarization for installed app was passed:
Code Block bash-3.2$ spctl -a -v '/Applications/MyApp.app' /Applications/MyApp.app: accepted source=Notarized Developer ID
I checked other downloaded apps (Intel or Universal). Some DMG files pass DMG notarization (for example, Audacity), and some fails (PerfectTablePlan). Why?
For my app (Universal) I use the following code to codesign and notarize:
Code Block codesign --timestamp --options runtime --force --deep -s "Developer ID Application: MYCOMPANY" "My.app" // Creating DMG with EULA license xcrun altool --notarize-app --primary-bundle-id MyApp -u "my@email.com" -p "abc123" --file MyApp.dmg xcrun stapler staple MyApp.dmg
Having said that, I do recommend that you sign your disk image. See Signing a Mac Product For Distribution for my advice on that front.
You are not checking notarisation here, you’re checking Gatekeeper compliance. And spctl is a poor way to check for that. See Testing a Notarised Product for my advice on how to do that.I checked other downloaded apps (Intel or Universal). Some DMG files
pass DMG notarization … and some fails
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"