Skip to content

fix(build): staple notarization ticket to .app and DMG#91

Merged
pasrom merged 1 commit intomainfrom
fix/notarization-staple
Apr 10, 2026
Merged

fix(build): staple notarization ticket to .app and DMG#91
pasrom merged 1 commit intomainfrom
fix/notarization-staple

Conversation

@pasrom
Copy link
Copy Markdown
Owner

@pasrom pasrom commented Apr 7, 2026

Summary

  • Notarize and staple the .app bundle directly (via ditto+zip submit) so Gatekeeper does not need an online check on first launch
  • Add --wait + xcrun stapler staple to the DMG notarization step

Why

A user reported the "MeetingTranscriber Not Opened — Apple could not verify..." dialog after a fresh Cask install, even though the build is correctly signed and notarized.

Investigation showed:

  • spctl: Notarized Developer ID ✅
  • stapler validate: ❌ no ticket stapled to either .app or DMG

Without a stapled ticket, Gatekeeper must contact Apple online on first launch. When that check fails (no network, captive portal, slow notary servers), users see the scary dialog. Cask installs are especially affected because the cask discards the DMG context after copying the .app, so any ticket on the DMG alone is lost.

Trade-off

The build now waits for Apple's notary service to finish (typically 1–5 min, occasionally up to ~15 min) before stapling. This makes releases slower but means users never hit the online-check failure path.

Test plan

  • Run ./scripts/build_release.sh locally with valid APPLE_ID/TEAM_ID/APP_PASSWORD
  • Verify xcrun stapler validate MeetingTranscriber.app succeeds
  • Verify xcrun stapler validate MeetingTranscriber-<version>.dmg succeeds
  • Install via cask on a fresh Mac (or one that has never seen the app) with network disabled and confirm no Gatekeeper dialog

@github-actions github-actions bot added the bug Something isn't working label Apr 7, 2026
@pasrom pasrom force-pushed the fix/notarization-staple branch 5 times, most recently from 15f632f to 69d86ee Compare April 9, 2026 19:24
Without a stapled ticket, Gatekeeper must contact Apple online on
first launch. When that check fails (no network, captive portal,
slow notary servers), users see "could not verify" — even though
the app is correctly notarized.

Cask installs are especially affected: the cask discards the DMG
context after copying, so any ticket on the DMG alone is lost.

Notarize and staple the .app explicitly (via ditto+zip submit), and
also wait+staple the DMG so direct DMG installs work offline too.
@pasrom pasrom force-pushed the fix/notarization-staple branch from 69d86ee to 99afd4f Compare April 10, 2026 04:36
@pasrom pasrom merged commit 9321686 into main Apr 10, 2026
6 checks passed
@pasrom pasrom deleted the fix/notarization-staple branch April 10, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant