Skip to content

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

  1. Using head and tail instead of pattern matching, causing runtime errors on empty lists
  2. Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks
  3. Using return to 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

### What is the difference between code signing and notarization?

Code signing verifies you as the developer. Notarization is Apple's automated scan for malware. Both are required for macOS 10.15+.

How do I create an app-specific password for notarization?

Go to appleid.apple.com > App-Specific Passwords > Generate. Use this password in notarytool commands.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro