Quick answer: status: Invalid means Apple’s notary service scanned your upload and found code that breaks its rules. The reasons are not in the command’s output. Run xcrun notarytool log <submission-id> and read the issues array: each entry names a file inside your app and one problem, most often a binary that is unsigned, signed without --timestamp, signed without --options runtime, or carrying the get-task-allow entitlement. Re-sign every binary from the inside out, zip the app with ditto, submit again, then staple the ticket to the app.

Notarization fails on your build machine, long before a player is involved, and the failure looks unhelpful: an upload, a wait, and the single word Invalid. The detail exists, in a JSON log you fetch with a second command. Once you have it, most failures come down to a short list of messages, and nearly all of them are about how a particular file was signed. This guide walks through the whole submission, the messages Apple’s documentation lists and what each one needs, a signing script that covers the plug-ins and frameworks engines put inside a bundle, and the packaging and account errors that stop a submission before the scan starts.

The exact error

A failed submission with --wait ends like this:

% xcrun notarytool submit MyGame.zip --keychain-profile "notary" --wait
Conducting pre-submission checks for MyGame.zip and initiating connection to the Apple notary service...
Submission ID received
  id: 75b7dc7b-364b-4929-a6f1-184bf3fd830d
Successfully uploaded file
  id: 75b7dc7b-364b-4929-a6f1-184bf3fd830d
  path: /Users/build/MyGame.zip
Waiting for processing to complete.
Current status: Invalid.......
Processing complete
  id: 75b7dc7b-364b-4929-a6f1-184bf3fd830d
  status: Invalid

Fetch the log with the submission id:

xcrun notarytool log 75b7dc7b-364b-4929-a6f1-184bf3fd830d --keychain-profile "notary" notary-log.json
{
  "logFormatVersion": 1,
  "jobId": "75b7dc7b-364b-4929-a6f1-184bf3fd830d",
  "status": "Invalid",
  "statusSummary": "Archive contains critical validation errors",
  "statusCode": 4000,
  "archiveFilename": "MyGame.zip",
  "uploadDate": "2026-11-30T18:04:11.482Z",
  "sha256": "...",
  "ticketContents": null,
  "issues": [
    {
      "severity": "error",
      "code": null,
      "path": "MyGame.zip/MyGame.app/Contents/Frameworks/libfoo.dylib",
      "message": "The signature does not include a secure timestamp.",
      "docUrl": null,
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "MyGame.zip/MyGame.app/Contents/MacOS/MyGame",
      "message": "The executable does not have the hardened runtime enabled.",
      "docUrl": null,
      "architecture": "arm64"
    }
  ]
}

Each issue has a path and a message. A universal binary is reported once per architecture, so a log with forty entries may describe twenty files. Read the log after a successful submission as well: an Accepted result can still carry entries with the severity warning.

The pipeline, start to finish

Notarization is one step in a fixed order. Every failure in this guide belongs to one of these steps:

  1. Sign every piece of code in the app with a Developer ID Application certificate, the hardened runtime and a secure timestamp.
  2. Package the app as a ZIP archive, a disk image or a signed installer package. The service accepts those three containers.
  3. Submit with notarytool and wait for Accepted or Invalid.
  4. Read the log, fix, and submit again if needed.
  5. Staple the ticket to the app, disk image or package.
  6. Verify with Gatekeeper’s own tools, then build the file you distribute.

notarytool ships with Xcode 13 and later. The older altool commands found in many build scripts and tutorials no longer work for this: Apple’s notary service stopped accepting uploads from altool and from Xcode 13 or earlier on November 1, 2023. If a script still calls xcrun altool --notarize-app, replace it. There is no equivalent of the old --primary-bundle-id argument; drop it.

What each log message means

Message in the logCauseFix
The binary is not signed.A Mach-O file inside the bundle has no signature. Usually a plug-in, a helper tool or a dylib the engine copied in.Sign that file. See the script below.
The signature of the binary is invalid.The file was changed after it was signed, or the archive damaged the bundle.Finish all changes to the bundle before signing. Zip with ditto.
The binary is not signed with a valid Developer ID certificate.Signed ad hoc, with an Apple Development or Mac App Distribution certificate, or with a self-signed oneSign code with Developer ID Application. Installer packages need Developer ID Installer.
The signature does not include a secure timestamp.codesign ran without --timestamp, or could not reach Apple’s timestamp serverAdd --timestamp to every codesign call
The executable does not have the hardened runtime enabled.An executable was signed without the runtime optionAdd --options runtime
The executable requests the com.apple.security.get-task-allow entitlement.A development entitlement that lets a debugger attach was left inRemove it from the entitlements file. In Xcode, set CODE_SIGN_INJECT_BASE_ENTITLEMENTS to NO for the release configuration. In Godot, turn the Debugging entitlement off.
The binary uses an SDK older than the 10.9 SDK.A prebuilt library from an old toolchainRebuild it with a current Xcode, or get a newer build from the vendor
Embedded entitlements are invalid: syntax error near line 1The entitlements file is not plain XML: a binary plist, a byte-order mark, or stray text before the XML declarationplutil -convert xml1 MyGame.entitlements, then plutil -lint, then sign again

The paths tell you where the work is. In a game bundle the failing files are rarely your own executable. They are the things an engine or SDK added: native plug-ins, bundled frameworks, a crash reporter helper, a Steamworks or audio middleware library.

To see how one file is signed right now:

codesign -dvv "MyGame.app/Contents/Frameworks/libfoo.dylib"

A correct result shows Authority=Developer ID Application: Your Studio (TEAMID) and a line that starts with Timestamp=. A line that starts with Signed Time= means there is no secure timestamp. For an executable, the flags= value includes runtime when the hardened runtime is on, for example flags=0x10000(runtime).

Fix 1: sign everything, from the inside out

Most Invalid results come from signing only the outer app, or from codesign --deep. The --deep flag applies the same options and the same entitlements to every nested binary, and it finds code only in the standard bundle locations, so a helper tool or library stored anywhere else stays unsigned. Sign each piece yourself, deepest first, and the app last:

#!/bin/bash
set -euo pipefail

APP="MyGame.app"
ID="Developer ID Application: Your Studio (TEAMID)"
MAIN="$APP/Contents/MacOS/$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$APP/Contents/Info.plist")"

sign() { codesign --force --options runtime --timestamp --sign "$ID" "$@"; }

# 1. loose Mach-O files (dylibs, plug-in binaries, helper tools), deepest first
find "$APP/Contents" -type f | awk -F/ '{ print NF "\t" $0 }' | sort -rn | cut -f2- |
while IFS= read -r f; do
  if [ "$f" = "$MAIN" ]; then continue; fi
  if file -b "$f" | grep -q "Mach-O"; then sign "$f"; fi
done

# 2. nested bundles (frameworks, plug-ins, helper apps), inner ones first
find "$APP/Contents" -depth -type d \
  \( -name "*.framework" -o -name "*.bundle" -o -name "*.app" \) |
while IFS= read -r b; do sign "$b"; done

# 3. the app itself, with the entitlements
sign --entitlements MyGame.entitlements "$APP"

# 4. check the result
codesign --verify --deep --strict --verbose=2 "$APP"

Step 1 skips the main executable, which is signed in step 3 as part of the app and is the only file that receives the entitlements. The awk and sort pair orders the files by path depth, so code nested inside a framework or plug-in is signed before the thing that contains it. If the bundle has a folder named .bundle that holds only data, codesign rejects it in step 2; exclude it from that find. Using --deep in step 4 is correct: for verification it only tells codesign to check nested code too.

Three rules keep this stable:

If codesign cannot find the identity, list what the keychain holds with security find-identity -v -p codesigning. The string in quotes on the Developer ID Application line is the value for ID.

Fix 2: give the hardened runtime only what the game needs

The hardened runtime is mandatory for notarization, and it blocks things some engines rely on, such as generating code at run time or loading a library signed by someone else. A build can therefore pass notarization and then crash on launch. Entitlements on the main executable reopen exactly what is needed:

EntitlementWhat it permitsWho asks for it
com.apple.security.cs.allow-jitWritable and executable memory created with the MAP_JIT flagRuntimes with a JIT compiler. Godot exposes it as Allow JIT Code Execution and always enables it for its Mono (C#) exports.
com.apple.security.cs.allow-unsigned-executable-memoryWritable and executable memory without MAP_JITOlder JIT code. Godot’s Allow Unsigned Executable Memory.
com.apple.security.cs.disable-library-validationLoading libraries signed by another team, or ad hocSteamworks (the overlay), mods, user plug-ins. Also in Unity’s example entitlements file. Godot’s Disable Library Validation.
com.apple.security.cs.allow-dyld-environment-variablesDYLD_* environment variables take effectSteamworks, so the overlay library can be injected
com.apple.security.cs.disable-executable-page-protectionDisables all code signing protections while the app runsListed in Unity’s example entitlements file. The broadest of the set.
com.apple.security.get-task-allowDebugger attachmentDevelopment builds only. Notarization rejects it.

An entitlements file for a Steam build that follows the Steamworks documentation:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.cs.disable-library-validation</key>
    <true/>
    <key>com.apple.security.cs.allow-dyld-environment-variables</key>
    <true/>
</dict>
</plist>

Apple’s advice is to request only the entitlements that are necessary, so start from the engine’s documented set and remove one at a time while the game still runs. Do not add com.apple.security.app-sandbox to a Steam build; Steamworks states that Steam is not compatible with the App Sandbox, and Developer ID notarization does not require it. To see what a signed app really carries:

codesign -d --entitlements :- MyGame.app

When the game passes notarization and then dies at launch with a library error, the crash report says which rule it hit. Fixing “dyld: Library not loaded” covers the Team ID and unsigned-library cases.

Fix 3: package and staple correctly

Create the upload with ditto:

/usr/bin/ditto -c -k --keepParent "MyGame.app" "MyGame.zip"

Frameworks contain symbolic links, and a tool that follows links and stores copies of the files produces an app whose signature no longer matches. That is one source of The signature of the binary is invalid. for a bundle that verified locally. ditto keeps the bundle intact.

After an Accepted result, staple the ticket so Gatekeeper can check the app without a network connection:

xcrun stapler staple "MyGame.app"
xcrun stapler validate "MyGame.app"

A successful run ends with The staple and validate action worked! and validation prints The validate action worked!. You can staple an app, a disk image and a flat installer package. You cannot staple a ZIP archive, and you cannot staple a standalone executable that is not in a bundle. For a ZIP release the order is therefore: zip, notarize, staple the app, then build a new ZIP from the stapled app and ship that one. The first archive was only a container for the upload.

For a disk image, sign the .dmg itself with the Developer ID Application identity after signing the app inside it, submit the image, and staple the image. For an installer, sign with productsign and a Developer ID Installer certificate, and check it with pkgutil --check-signature.

Steam needs the same build. Steamworks’ documentation states that since October 14th, 2019 all new macOS applications on Steam must be 64-bit and notarized. Upload the signed, stapled app in the depot and do not modify the bundle in the upload script.

Errors before the scan: credentials and agreements

Two failures appear before any submission id, and neither has anything to do with the build.

Error: HTTP status code: 401. Invalid credentials. Username or password is incorrect. Use the app-specific password generated at appleid.apple.com. Ensure that all authentication arguments are correct.

notarytool does not accept your Apple Account password. Create an app-specific password in your Apple Account settings and store it once in the keychain:

xcrun notarytool store-credentials "notary" \
  --apple-id "you@example.com" --team-id "TEAMID" --password "abcd-efgh-ijkl-mnop"

Every later command then takes --keychain-profile "notary". The team id must be the team that owns the Developer ID certificate, which matters when one Apple Account belongs to several teams. On CI, an App Store Connect API key avoids a personal password: pass --key AuthKey_KEYID.p8 --key-id KEYID --issuer ISSUER-UUID.

Error: HTTP status code: 403. A required agreement is missing or has expired. This request requires an in-effect agreement that has not been signed or has expired.

Apple updated a developer agreement and nobody has accepted the new version, or the program membership lapsed. The Account Holder of the team has to sign in to the developer account and accept it. This tends to break a pipeline that was green the day before, with no change on your side.

Two operational notes for CI. A submission can stay In Progress for a while; Apple’s documentation says most complete within 5 minutes and 98 percent within 15, so give --wait a generous timeout and use xcrun notarytool history and xcrun notarytool info <id> to check on one later. And make the job look at the status itself. Add --output-format json and fail the job unless the status field is Accepted, so an Invalid result can never be mistaken for success.

How to confirm the build will open

Ask Gatekeeper directly:

% spctl -a -vv -t exec MyGame.app
MyGame.app: accepted
source=Notarized Developer ID
origin=Developer ID Application: Your Studio (TEAMID)

source=Notarized Developer ID is the line that matters. A result of rejected with source=Unnotarized Developer ID means the signature is good and Gatekeeper found no ticket, so check that the submission was accepted for this exact build and that nothing re-signed the app afterwards.

Then test the way a player receives the game. A file you built locally has no quarantine attribute, so opening it on the build machine exercises none of this. Upload the final archive, download it in a browser on a different Mac, and open it from the Downloads folder. xattr -l MyGame.zip on the downloaded file should list com.apple.quarantine. If the game opens with only the standard “downloaded from the Internet” confirmation, the pipeline works. Run this test with the network off once as well: that is what stapling is for.

What players see, and what they can do

A notarization failure you catch in the pipeline costs players nothing. The cost comes when a build ships without a ticket, for example because the script ignored an Invalid result or a late step re-signed the app. Players then get a Gatekeeper dialog and no game:

Until a fixed build is up, a player who trusts the download can open System Settings > Privacy & Security after the first blocked attempt and click Open Anyway. Give those steps next to the download link and say when the corrected build is expected. Treat it as a stopgap, because it asks every player to override a security prompt for your game.

Where this shows up outside the pipeline

Notarization is a build-pipeline problem and it never reaches Bugnet. The submission fails on your machine or your CI runner, and a game that Gatekeeper blocks runs none of its code, so no SDK inside it can report anything. What reaches you is people: players who cannot open the game and write in through a store page, an email or a community channel.

Bugnet helps with that part. Each project can have a public bug tracker, and a known-issue entry titled with the exact dialog text, carrying the Open Anyway steps and the date of the fixed build, is what a player finds after pasting the message into a search box. Once players are past the dialog, an SDK such as the Unity one provides the in-game report form and automatic error capture, and every report includes the macOS version and CPU, so you can see whether both Apple silicon and Intel players are getting in.

Frequently asked questions

What does status: Invalid mean in notarytool?

Apple's notary service scanned the upload and found at least one file that breaks its rules, so no ticket was issued. The command output does not say which file. The reasons are in the submission log, which lists a path and a message for every problem.

How do I find out why notarization failed?

Run xcrun notarytool log with the submission id and the same credentials you used to submit. The JSON it returns has an issues array, and each entry names a file inside the app, a message such as The signature does not include a secure timestamp, and the architecture it applies to.

Can I still notarize with altool?

No. Apple's notary service stopped accepting uploads from altool and from Xcode 13 or earlier on November 1, 2023. Use xcrun notarytool, which ships with Xcode 13 and later, and remove the old primary bundle id argument because notarytool has no equivalent.

Can I staple a notarization ticket to a zip file?

No. A ticket can be stapled to an app, a disk image or a flat installer package, but not to a ZIP archive. Notarize the zip, staple the app that was inside it, and then create a new zip from the stapled app for distribution.

Does a Mac game sold only on Steam need to be notarized?

Yes. Steamworks documentation states that since October 14th, 2019 all new macOS applications on Steam must be 64-bit and notarized by Apple. It also lists the hardened runtime entitlements a Steam build needs so the overlay library can load.

The submit command never tells you what is wrong. Fetch the log for every submission, including accepted ones, and make CI fail unless the status is Accepted.