How to Fix macOS Notarization Errors — App Not Notarized
DodaTech
Updated 2026-06-24
2 min read
In this tutorial, you'll learn about How to Fix macOS Notarization Errors. We cover key concepts, practical examples, and best practices.
The Problem
Notarization fails:
Error: Notarization failed for /path/to/app.zip
or:
The app is damaged and can't be opened. Move to Trash.
Quick Fix
Step 1: Build with the correct settings
# Build for distribution:
xcodebuild -project MyApp.xcodeproj -scheme MyApp -configuration Release -archivePath MyApp.xcarchive archive
# Export the app:
xcodebuild -exportArchive -archivePath MyApp.xcarchive -exportPath MyApp -exportOptionsPlist export.plist
Step 2: Submit for notarization
xcrun notarytool submit MyApp.zip --apple-id "your@email.com" --team-id "TEAMID" --password "app-specific-password" --wait
Step 3: Check notarization status
xcrun notarytool history --apple-id "your@email.com" --team-id "TEAMID" --password "app-specific-password"
xcrun notarytool log <submission-id> --apple-id ... --team-id ... --password ...
Step 4: Staple the ticket
xcrun stapler staple MyApp.app
Verify:
xcrun stapler validate MyApp.app
Step 5: Fix common submission errors
# Error: Invalid profile:
# Create an app-specific password at appleid.apple.com
# Error: bundle ID mismatch:
# Ensure CFBundleIdentifier matches your Apple Developer account
# Error: team ID mismatch:
xcodebuild -showBuildSettings | grep DEVELOPMENT_TEAM
Step 6: Notarize a DMG
xcrun notarytool submit MyApp.dmg --apple-id "your@email.com" --team-id "TEAMID" --password "app-specific-password" --wait
xcrun stapler staple MyApp.dmg
Prevention
- Use Xcode's automatic notarization for simple apps.
- Test notarization with your Developer ID certificate, not a development certificate.
- Keep your Apple ID and app-specific password in Keychain.
Common Mistakes with notarization error
- Using
headandtailinstead of pattern matching, causing runtime errors on empty lists - Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks
- Using
returnto exit a function early instead of wrapping a pure value in the monad
These mistakes appear frequently in real-world MACOS code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
← Previous
How to Fix macOS launchd Plist Errors — Services Not Starting
Next →
How to Fix macOS PKG Build Errors — Installer Package Creation
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro