
Alessandro Frank
CTO
This guide walks you through signing, notarizing, and distributing macOS .app bundles so your apps launch securely and without errors on any Mac.

I figured out how to bundle some source code into a GUI binary (fyne in my case).
Then I ran into a problem: it's either forbidden to execute or marked as "damaged" when other people use it.
You'll have to do the following so that it just werks.
Hint: this works only if the Apple setup is already done, in which case you probably have a similar snippet somewhere.
sign-notarize: build-gui
codesign --force --deep --timestamp --options runtime --sign "$(CERT_NAME)" "$(BUILD_DIR)/$(DOTAPP)"
zip -r "$(BUILD_DIR)/$(DOTAPP).zip" "$(BUILD_DIR)/$(DOTAPP)"
xcrun notarytool submit "$(BUILD_DIR)/$(DOTAPP).zip" --keychain-profile "notarytool-profile" --wait
xcrun stapler staple "$(BUILD_DIR)/$(DOTAPP)"
rm "$(BUILD_DIR)/$(DOTAPP).zip"
zip -r "$(BUILD_DIR)/$(DOTAPP)-signed.zip" "$(BUILD_DIR)/$(DOTAPP)"
You'll need to perform a handful of steps: build → sign → zip → notarize → staple → re-zip → distribute.
If you're asking "what certificate?", you won’t like this part.
You need a $99/year Apple Developer account. No way around it.
The certificate name is what goes into --sign "Certificate Name".
Install Xcode command line tools:
xcode-select --install
# Verify xcrun is available
xcrun --version
Store notarization credentials once:
xcrun notarytool store-credentials "notarytool-profile" \
--apple-id "your@apple-id.com" \
--team-id "YOUR_TEAM_ID" \
--password "app-specific-password"
⚠️ The password is an app-specific password from appleid.apple.com, not your regular Apple ID password.
# Sign the app
codesign --force --deep --timestamp --options runtime \
--sign "Developer ID Application: Your Name (TEAM_ID)" \
"myapp.app"
# Zip for notarization
zip -r "myapp.app.zip" "myapp.app"
# Submit for notarization (1-3 minutes typically)
xcrun notarytool submit "myapp.app.zip" \
--keychain-profile "notarytool-profile" --wait
# Success looks like:
# "Processing complete. Submission ID: xxx-xxx-xxx"
# "status: Accepted"
# Staple the notarization
xcrun stapler staple "myapp.app"
# Clean up and create final distributable
rm "myapp.app.zip"
zip -r "myapp-signed.zip" "myapp.app"
--deep flag, check entitlementscodesign -dv --verbose=4
The setup is painful once – trivial afterwards.
The $99 is Apple’s developer tax: pay it, or stick to localhost.
Alessandro is a technical mastermind and Chief Technology Officer at Iridium Works. Over the years he has build countless systems working with Front- and BackEnd, DevOps and as a Tech Lead. He writes about new technology, software development.
Access our exclusive whitepapers, expert webinars, and in-depth articles on the latest breakthroughs and strategic implications of webdesign, software development and AI.