Lesson 8 of 9 · 27m
macOS Bundles, Signing, Notarization, and Universal Builds
Navigate app bundle structure, entitlements, Developer ID signing, notarization, Gatekeeper, architecture targets, and macOS update behavior.
macOS shipping feels polished right up until Gatekeeper decides your application is an unidentified blob from the internet. The platform rewards precise ceremony: correct bundle layout, correct signing order, correct entitlements, correct notarization, correct stapling. Skip one step and users see frightening warnings or the app simply refuses to launch. This is not arbitrary cruelty; Apple is enforcing a chain of custody.
Understand the bundle shape
A macOS app is a directory that pretends to be one file:
Acme Console.app/Contents/
Info.plist MacOS/acme-console Resources/icon.icnsInfo.plist carries bundle identifier, version, executable name, supported document types, minimum system version, and permission usage strings. Tauri generates much of this, but you own the result. Inspect it before release:
plutil -p 'src-tauri/target/release/bundle/macos/Acme Console.app/Contents/Info.plist'Signing is identity plus constraints
Developer ID signing proves the artifact came from your team. Entitlements declare sensitive capabilities the process requires. Signatures must cover nested code in the correct order; embedded helpers, frameworks, and sidecars are signed before the outer bundle.
Useful inspection commands:
codesign --verify --deep --strict --verbose=2 'Acme Console.app'
codesign -dv --entitlements :- 'Acme Console.app'
spctl --assess --type execute -vv 'Acme Console.app'Notarization is a server-side review pipeline
Modern notarization commonly uses notarytool:
xcrun notarytool submit 'Acme Console.zip' --apple-id "$APPLE_ID" --team-id "$TEAM_ID" --password "$APP_SPECIFIC_PASSWORD" --wait
xcrun stapler staple 'Acme Console.app'Stapling lets Gatekeeper validate offline. If users open a non-stapled app without network access, they can receive avoidable trust failures. CI can notarize, but credentials and artifact flow must be tightly controlled.
Universal builds are supply-chain multiplication
Apple Silicon (aarch64-apple-darwin) and Intel (x86_64-apple-darwin) are separate native binaries. A universal app contains both, doubling relevant native code and multiplying sidecar obligations. If you bundle a sidecar, each architecture needs the correct binary or a universal equivalent. A signed arm64 shell wrapping an x64 helper in the wrong place can produce confusing runtime failure even when bundling succeeds.
Hardened runtime changes debugging
With hardened runtime, some behaviors require explicit entitlements: JIT, unsigned executable memory, library validation exceptions, automation, file access categories. Do not copy broad entitlement files from random repositories. Each one is an attack-surface statement. If a crash only appears in signed builds, compare entitlements and signing environment before blaming application logic.
Field notes
- Never store notarization credentials in a shell history or repository. CI secrets and keychain profiles exist for a reason.
- Notarization acceptance is not permanent proof; revoked certificates and malformed future builds create new failures.
- Test from a quarantined download, not only from the build directory. Gatekeeper behavior differs.
- Keep exact signing identities and team IDs in release documentation; multiple Apple IDs in one company routinely causes confusion.
Was this lesson helpful?