Skip to main content

Posts

Showing posts with the label macOS

Debugging macOS Notarization: Solving 'Invalid Signature' in Electron Builds

  The "It Works on My Machine" Trap You have a green build pipeline. The application runs locally. You’ve successfully uploaded your artifact to the Apple Notary Service, and  xcrun notarytool  returns  status: Accepted . Yet, when you download the DMG and attempt to launch it on a fresh macOS instance, Gatekeeper intervenes:  "App is damaged and can't be opened." Running a manual assessment usually yields the dreaded, ambiguous failure: spctl --assess --type execute --verbose --ignore-cache /Applications/MyApp.app # Output: /Applications/MyApp.app: rejected # source=Unnotarized Developer ID Or worse, deep in the system logs, you find  errSecInternalComponent  or  Missing Secure Timestamp . This is rarely a code issue; it is a DevOps architecture issue involving the Mach-O binary structure, nested code signing, and the Hardened Runtime requirements introduced by macOS Catalina and strictly enforced in Sonoma and Sequoia. Root Cause: The Timestamp ...

Fixing 'Unidentified Developer': Automating Electron macOS Notarization

  The most frustrating bug report an Electron maintainer can receive isn't a runtime error or a layout gltich—it's the report that the application simply won't open. The dreaded "Unidentified Developer" modal is a hard stop for user acquisition. While code signing proves  who  you are, it no longer proves  what  your code is. Since macOS 10.15 (Catalina), Apple enforces  Notarization  for all software distributed outside the Mac App Store. If you aren't stapling a notarization ticket to your DMG or ZIP, your app is effectively dead on arrival. Automating this in a headless CI/CD environment (GitHub Actions, GitLab CI, CircleCI) is notoriously brittle due to Apple ID 2FA requirements. This guide implements a robust, stateless solution using App Store Connect API Keys and  notarytool , bypassing legacy app-specific passwords entirely. The Root Cause: Gatekeeper & Notarytool Under the hood, macOS Gatekeeper performs a quarantine check on download...