Code Signing
Sign and notarize your Native SDK app for distribution.
macOS signing
Sign the bundle with a Developer ID:
Identity signing enables the hardened runtime and explicitly requests Apple's secure timestamp. If the timestamp service cannot be reached, packaging fails instead of producing a distribution signature that notarization will reject.
Signing modes:
| Mode | Description |
|---|---|
none | No signing (default) |
adhoc | Ad-hoc signing for local testing |
identity | Sign with a named identity (requires --identity) |
What Gatekeeper shows for an ad-hoc package
An ad-hoc signature verifies bundle integrity but carries no developer identity. Gatekeeper may block a downloaded copy that has the quarantine attribute. The dialog and available override controls depend on the macOS version and device policy; when permitted, users can allow a blocked app in System Settings → Privacy & Security.
Local builds and some file-transfer methods do not add quarantine, but an existing quarantine attribute may be preserved. Do not use the absence of a launch dialog as evidence of a distribution signature.
Use codesign --verify --strict to check the signature. If verification fails, rebuild and sign the final bundle after copying its resources. For public distribution, use Developer ID signing and notarization.
Signing flags
| Flag | Description |
|---|---|
--signing | Signing mode: none, adhoc, or identity |
--identity | Code signing identity name |
--entitlements | Path to entitlements file (e.g. assets/native-sdk.entitlements) |
--notarize | Submit the final macOS artifact, then staple and validate the accepted ticket |
--notary-profile | Name of a notarytool Keychain profile created with store-credentials |
Notarization
Store notarization credentials in Keychain once. A team App Store Connect API key is the normal CI choice:
Apple ID credentials work too:
Then package, timestamp-sign, notarize, staple, and validate in one command:
With --archive, Native SDK first submits the signed app, staples and validates it, then builds and signs the DMG and submits, staples, and validates that final image. Without --archive, only the app submission runs. Any updater ZIP is created afterward from the stapled app.
The framework repository exposes the same path for local release testing:
Chromium apps
Chromium packages include Chromium Embedded Framework.framework inside the .app. Sign and notarize the final package after CEF has been bundled so the app binary, helper executables, and embedded framework are covered by the same distribution identity.
Use .web_engine = "chromium" and .cef = .{ .dir = "third_party/cef/macos", .auto_install = false } in app.zon for the normal signing path. -Dweb-engine, --web-engine, -Dcef-dir, and --cef-dir remain available for temporary overrides.
If Gatekeeper rejects the app, check that the CEF framework is present in Contents/Frameworks, that every nested helper is signed, and that the package was rebuilt after any CEF version change.
DMG creation
Create a distributable disk image:
This creates the conventional drag-to-Applications presentation by default: a generated background and arrow, positioned app and Applications icons, hidden Finder chrome, and a compressed final image. Customize it through the dmg manifest fields.
Entitlements
The project includes assets/native-sdk.entitlements as a starting point. Customize it for your app's needs (e.g. network access, file system access, camera).