Repository navigation
Build/unsigned mac packaging - #1
Merged
Merged
Conversation
Packaging never used a certificate, but it did not say so either: with no identity set, electron-builder auto-discovers whatever sits in the local keychain, so a build on a machine holding a Development certificate produced an app that only ran on that machine. When it found nothing it skipped signing altogether, which is worse than it sounds -- the bundle keeps the signature Electron shipped with, over resources electron-builder has since rewritten, and `codesign --verify` fails it with "code has no resources but signature indicates they must be present". Gatekeeper calls a quarantined copy of that "damaged and can't be opened", which right-click Open will not clear. `identity: "-"` signs ad-hoc instead: no certificate, no team, nothing Gatekeeper accepts -- but a signature that verifies, so a quarantined copy gets the ordinary unidentified-developer dialog that right-click Open does clear. `dist:mac` sets CSC_IDENTITY_AUTO_DISCOVERY=false as well, so a certificate in the keychain cannot quietly change what a local build produces; CI already passed it. Verified against a real `npm run dist:mac`: both architectures report flags=0x2(adhoc) with no team identifier, `codesign --verify --deep --strict` exits 0, the signature survives the zip round-trip, and the binary executes on arm64 once the quarantine flag is removed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The old two lines said builds were unsigned and how to sign them, which left out the only part a recipient needs: macOS quarantines the app the moment it arrives by download, AirDrop, Slack or email, and an ad-hoc signature does not clear that. Right-click Open, or `xattr -dr com.apple.quarantine`, once per install. Also records why the build signs ad-hoc rather than not at all, with the `codesign --verify` error the previous arrangement produced, and completes the notarisation note: dropping `identity` is not enough, hardenedRuntime has to go back on for Apple to accept the upload. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.