I have MacOS bundle application which I've signed, packed into dmg and notarized.
When I upload and download the dmg, copy the app somewhere, it is rejected by gatekeeper:
“my” cannot be opened because the developer cannot be verified.
or
“check-signature” cannot be opened because it is from an unidentified developer.
Tested on Monterey and High Sierra.
In past it worked, but my HDD crashed so I had to install OS and whole development environment again so now I'm trying with different xcode version (13.4.1) and some 3rd party c++ libraries are newer, but basically layout of the application is the same and also code signing post build script which calls codesign inside out.
In the Contents/MacOS folder my application contains nested bundle app. When I omit that nested bundle and notarize the app, gatekeeper is happy, but I need that nested application.
When I verify dmg, or extracted application, there is no problem:
spctl -a -t exec -vvv my.app
my.app: accepted
source=Notarized Developer ID
origin=Developer ID Application: my company (L….)
spctl -a -t exec -vvv my.app/Contents/MacOS/nested.app
my.app: accepted
source=Notarized Developer ID
origin=Developer ID Application: my company (L….)
codesign --verify --deep --strict -v my.app
my.app: valid on disk
my.app: satisfies its Designated Requirement
I've also tried check-signature tool (ironically it is not notarized)
./check-signature my.app .my.dmg
(c) 2014 Apple Inc. All rights reserved.
my.app: YES
my.dmg: YES
I've also checked the logs, I've found nothing suspicious. Mounting the DMG:
assessment granted for my.dmg by Notarized Developer ID
com.apple.message.domain: com.apple.security.assessment.outcome2
com.apple.message.signature2: bundle:UNBUNDLED
com.apple.message.signature3: my.dmg
com.apple.message.signature5: UNKNOWN
com.apple.message.signature4: 3
com.apple.message.signature: granted:Notarized Developer ID
Some log from finder about opening the app, then this from syspolicyd:
assessment granted for .app by Developer ID
com.apple.message.domain: com.apple.security.assessment.outcome2
com.apple.message.signature2: bundle:com.my
com.apple.message.signature3: .app
com.apple.message.signature5: 1.0
com.apple.message.signature4: 1
com.apple.message.signature: granted:Developer ID
I've followed advices from other threads from this forum, but I cannot figure out anything. Any idea what else can I do to see what exactly is the problem? Thank you.