macOS Developer ID Notarization & Stapling Checklist (2026)
Every step required to pass macOS Gatekeeper cleanly on Sequoia and Tahoe — from Hardened Runtime entitlements and secure timestamps to notarytool submit, stapling DMGs vs ZIPs, and CI verification.
Shipping a macOS app outside the Mac App Store means owning the full trust chain between your build machine and Apple Gatekeeper. One unsigned nested helper binary, a missing secure timestamp, or notarizing only the .app instead of the outer .dmg is enough to greet first-time buyers with a scary "cannot be opened because Apple cannot check it for malicious software" dialog.
Here is the exact checklist we run in CI for every native Swift and Electron macOS build shipped through ReleaseFlow.
1. Signing identity, Hardened Runtime, and entitlements
You need a Developer ID Application certificate (not Apple Development or Mac App Distribution) exported as a .p12 into your CI runner's temporary keychain. Every Mach-O binary inside Contents/Frameworks, Contents/Helpers, and Contents/PlugIns must be signed inside-out before signing the outer .app bundle.
codesign --force --options runtime --timestamp \
--entitlements build/entitlements.mac.plist \
--sign "Developer ID Application: Your Name (TEAMID1234)" \
dist/MyApp.app
# Verify signature chain strictly before archiving
codesign --verify --deep --strict --verbose=2 dist/MyApp.app2. Notarizing .zip update archives vs .dmg installers
Most indie Mac apps ship two artifacts per release: a pretty .dmg for browser downloads and a .zip archive for Sparkle or Squirrel.Mac auto-updates. Use ditto (not plain zip) so macOS preserves symlinks and extended attributes.
# Create a Sparkle-safe zip preserving symlinks and resource forks
ditto -c -k --keepParent dist/MyApp.app dist/MyApp-1.4.18-arm64.zip
# Submit with App Store Connect API key (preferred over app-specific passwords)
xcrun notarytool submit dist/MyApp-1.4.18-arm64.zip \
--key "$ASC_API_KEY_PATH" \
--key-id "$ASC_KEY_ID" \
--issuer "$ASC_ISSUER_ID" \
--waitIf notarization fails, immediately pull the JSON log using xcrun notarytool log <submission-id> with the same credentials. Nine times out of ten it pinpoints the exact nested .dylib or helper executable missing --timestamp or Hardened Runtime.
3. Stapling tickets so offline users pass Gatekeeper
You cannot staple a ticket directly onto a .zip file — zip archives have no Mach-O or UDIF trailer slot for the notarization ticket. Instead, staple the .app bundle BEFORE zipping it for Sparkle, and staple the signed .dmg after notarizing the .dmg itself.
# Staple the app bundle first, then re-create the update .zip
xcrun stapler staple dist/MyApp.app
ditto -c -k --keepParent dist/MyApp.app dist/MyApp-1.4.18-arm64.zip
# Sign, notarize, and staple the DMG installer
codesign --force --timestamp --sign "$SIGNING_ID" dist/MyApp-1.4.18-arm64.dmg
xcrun notarytool submit dist/MyApp-1.4.18-arm64.dmg --key "$ASC_API_KEY_PATH" --key-id "$ASC_KEY_ID" --issuer "$ASC_ISSUER_ID" --wait
xcrun stapler staple dist/MyApp-1.4.18-arm64.dmg
# Final Gatekeeper check (must report: accepted / source=Notarized Developer ID)
spctl -a -t exec -vvv dist/MyApp.app
xcrun stapler validate dist/MyApp-1.4.18-arm64.dmg4. Pre-tag release verification checklist
- All nested binaries (.dylib, .framework, Sparkle Autoupdate, Electron helpers) signed with --options runtime --timestamp.
- Info.plist CFBundleVersion incremented monotonically (matching Sparkle sparkle:version).
- ditto -c -k --keepParent used after stapling the .app so the Sparkle .zip carries an offline-verifiable ticket.
- Sparkle EdDSA signature (.sig) generated AFTER the final stapled .zip is created (re-zipping invalidates the signature!).
- spctl -a -t exec -vvv reports source=Notarized Developer ID with exit code 0.
Ship your Mac or Electron app with a single git tag.
Permanent OS-aware download links, cached Sparkle & Electron auto-update feeds, Polar/Stripe PPP checkout, and license keys — with 0% cut on your sales.