It seems that the code signing was successful, but notarization fails.

I want to distribute a macOS application created with Electron to third parties, but I am currently unable to do so because the code signing is not working correctly.

From the following response, it appears that the code signing itself was successful:

$ codesign -dvvv dist/mac-arm64/AnySticky.app

Executable=/Users/myname/dev/electron-tutorial/dist/mac-arm64/AnySticky.app/Contents/MacOS/AnySticky

Identifier=com.electron.electron-tutorial

Format=app bundle with Mach-O thin (arm64)

CodeDirectory v=20500 size=778 flags=0x10000(runtime) hashes=13+7 location=embedded

Hash type=sha256 size=32

CandidateCDHash sha256=e105ecd3c2051554239df404c185f00fca5900de

CandidateCDHashFull sha256=e105ecd3c2051554239df404c185f00fca5900de742e572c154aa889e9929186

Hash choices=sha256

CMSDigest=e105ecd3c2051554239df404c185f00fca5900de742e572c154aa889e9929186

CMSDigestType=2

CDHash=e105ecd3c2051554239df404c185f00fca5900de

Signature size=9083

Authority=Apple Development: MY NAME (66MDM239Z8)

Authority=Apple Worldwide Developer Relations Certification Authority

Authority=Apple Root CA

Timestamp=Dec 18, 2024 at 20:26:03

Info.plist entries=30

TeamIdentifier=9C8S7XP2UN

Runtime Version=14.0.0

Sealed Resources version=2 rules=13 files=11

Internal requirements count=1 size=192

However, when I attempt to notarize the app, I receive an error stating that the app is not signed with a valid Developer ID certificate:

$ xcrun notarytool submit dist/mac-arm64/AnySticky.zip --keychain-profile "AnySticky" --wait

Excerpt from the error message:

{
  "severity": "error",
  "code": null,
  "path": "AnySticky.zip/AnySticky.app/Contents/MacOS/AnySticky",
  "message": "The binary is not signed with a valid Developer ID certificate.",
  "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
  "architecture": "arm64"
},
{
  "severity": "error",
  "code": null,
  "path": "AnySticky.zip/AnySticky.app/Contents/Frameworks/AnySticky Helper (Renderer).app/Contents/MacOS/AnySticky Helper (Renderer)",
  "message": "The binary is not signed with a valid Developer ID certificate.",
  "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721",
  "architecture": "arm64"
},
...

I would greatly appreciate any guidance on how to resolve this issue.

Thanks.

Thanks for the post. Have you read the post Quinn created all about how to notarized your app?:

https://forums.developer.apple.com/forums/thread/130560

Hope this helps.

Albert Pascual
  Worldwide Developer Relations.

When i first tried to notarize i got errors because my certificate was type "development". The signing was ok, but the used certificate was not allowed for distribution. Try to check the type of your certificat.

It seems that the code signing was successful, but notarization fails.
 
 
Q