# How do I sign and notarize a macOS app?

> Sign a macOS app with Developer ID, notarize it with notarytool and staple the ticket: Apple's commands in 6 steps, run over SSH on a rented Mac.

- URL: https://remotemacmini.com/guides/how-to-sign-and-notarize-a-macos-app/
- Last updated: 2026-11-17
- Publisher: RemoteMacMini (https://remotemacmini.com)

**Quick answer — How do I sign and notarize a macOS app?**

Sign every executable with a Developer ID Application certificate, the hardened runtime and a secure timestamp, zip the app with `ditto`, submit it with `xcrun notarytool submit --wait`, then staple the ticket with `xcrun stapler staple`. Apple caps notarization at 75 submissions a day. On an **RemoteMacMini** Mac ($76.50 a month) the whole chain runs over SSH.

**In brief**

- **Certificate**: Developer ID Application for apps and tools, Developer ID Installer for packages.
- **Signature options**: hardened runtime (`--options=runtime`) and a secure timestamp (`--timestamp`); no `get-task-allow` entitlement.
- **Tool**: `notarytool`, which needs Xcode 13 or later; the notary service stopped taking `altool` on 1 November 2023.
- **Formats**: ZIP, UDIF disk images and signed flat installer packages; a ZIP cannot be stapled.
- **Mac App Store apps**: no notarization needed, since App Review runs equivalent checks.

## What are the steps, from signing to stapling?

**Six steps from Apple's notarization pages. Replace the names in angle brackets with yours.**

1. **Sign with Developer ID** — Run codesign with your Developer ID Application identity, the runtime option and a timestamp, for example: codesign --force --options=runtime --timestamp --sign "Developer ID Application: <Name> (<TEAM_ID>)" MyApp.app. Sign nested executables too.
2. **Check the signature** — Run codesign -vvv --deep --strict MyApp.app, then codesign -dvv MyApp.app and look for a Timestamp line rather than Signed Time.
3. **Zip the app** — Run /usr/bin/ditto -c -k --keepParent MyApp.app MyApp.zip; the notary service cannot take a bare .app bundle.
4. **Store credentials once** — Run xcrun notarytool store-credentials "notarytool-password" --apple-id <AppleID> --team-id <TeamID> --password <app-specific password>.
5. **Submit and wait** — Run xcrun notarytool submit MyApp.zip --keychain-profile "notarytool-password" --wait. A status of Accepted means it passed.
6. **Staple and re-zip** — Run xcrun stapler staple MyApp.app, then zip the stapled app again for distribution.

## What makes notarization fail, and how do you fix it?

**Most rejections come from the signature, not the code; Apple's log names the file at fault.**

*Common macOS notarization errors from Apple's documentation, with the fix for each*

| Log message or cause | Fix |
| --- | --- |
| The executable does not have the hardened runtime enabled | Sign with `--options=runtime` (or OTHER_CODE_SIGN_FLAGS in Xcode) |
| Signature without a secure timestamp | Add `--timestamp`; it needs internet access to timestamp.apple.com |
| The executable requests the com.apple.security.get-task-allow entitlement | Remove it; Xcode's export strips it, custom scripts must too |
| Signed with Mac App Distribution, ad hoc or a development certificate | Re-sign with Developer ID Application (Developer ID Installer for .pkg) |
| The signature of the binary is invalid | Re-sign every nested binary, then the bundle |
| Uploaded a .app directly | Wrap it in a ZIP made by `ditto`, a disk image or a signed .pkg |

## How do you read the notarization log?

**With `notarytool log`, even when the status is Accepted.** Apple advises reading it every time, since it can carry warnings. The command takes the submission ID printed at upload:

`xcrun notarytool log <submission-id> --keychain-profile "notarytool-password" developer_log.json`

The JSON lists each issue with its path and severity. An `Invalid` status with "Archive contains critical validation errors" means at least one file failed; fix those paths and submit again. Apple asks developers to stay under 75 notarizations a day.

## Why sign and notarize on a remote Mac?

**Because `codesign`, `notarytool` and `stapler` ship with Xcode and run only on macOS.** Teams on Windows or Linux, or CI pipelines, can keep the Developer ID certificate in the keychain of one rented Mac and run the six steps over SSH. RemoteMacMini never needs the customer's Apple Account; signing in to one on the Mac is the customer's choice.

According to RemoteMacMini's survey of 17 November 2026, a comparable M4 with 16 GB rented from $85 a month at MyRemoteMac (excluding tax); RemoteMacMini's Pip costs $76.50. Install the tools first with the [Xcode guide](https://remotemacmini.com/guides/how-to-install-xcode-from-the-command-line/ "How do I install Xcode from the command line?"). For iOS apps, which go through App Review instead, see the [upload guide](https://remotemacmini.com/guides/how-to-upload-an-ios-build-from-a-remote-mac/ "How do I upload an iOS build from a remote Mac?"). All tutorials are on the [guides page](https://remotemacmini.com/guides/ "Which guides does RemoteMacMini publish?").

## Signing and notarizing a macOS app: common questions

### Do I have to notarize an app sold on the Mac App Store?

No. Apple says the App Store submission process already includes equivalent security checks.

### Can I still use altool to notarize?

No. Apple's notary service stopped accepting altool on 1 November 2023. Use notarytool, which needs Xcode 13 or later.

### Why can't I staple my ZIP file?

Apple's stapler works on apps, bundles, disk images and flat installer packages, not on ZIP archives. Staple the app inside, then make a new ZIP.

### Can I use an App Store Connect API key instead of an app-specific password?

Yes. Apple's TN3147 says notarytool takes the same credentials as altool, an API key included: pass `--issuer <issuer UUID> --key-id <key ID> --key <path to the .p8 file>`, and no Apple ID is needed.

### Is there a daily limit?

Apple asks developers to limit notarizations to 75 per day.

**Verdict**

- **Sign with Developer ID, the hardened runtime and a timestamp, then notarize with notarytool and staple**: six commands in total.
- **A rented Mac runs the chain for teams without one**: RemoteMacMini's Pip costs $76.50 a month.

## Sources

1. [Notarizing macOS software before distribution](https://developer.apple.com/documentation/security/notarizing-macos-software-before-distribution) — Apple Developer (read 2026-11-17)
2. [Customizing the notarization workflow](https://developer.apple.com/documentation/security/customizing-the-notarization-workflow) — Apple Developer (read 2026-11-17)
3. [Resolving common notarization issues](https://developer.apple.com/documentation/security/resolving-common-notarization-issues) — Apple Developer (read 2026-11-17)
4. [TN3147: Migrating to the latest notarization tool](https://developer.apple.com/documentation/technotes/tn3147-migrating-to-the-latest-notarization-tool) — Apple Developer (read 2026-11-17)
5. [Installing the command-line tools](https://developer.apple.com/documentation/xcode/installing-the-command-line-tools) — Apple Developer (read 2026-11-17)

**A Mac for signing and notarizing, $76.50 a month** Pip: Apple M4, 10-core CPU, 10-core GPU, 16 GB, 256 GB SSD. Your certificates, your keychain, no one else on the machine. [Rent Pip for 1 month](https://remotemacmini.com/app/checkout/?plan=pip&term=1m&from=guides-how-to-sign-and-notarize-a-macos-app&lang=en) · [All guides](https://remotemacmini.com/guides/ "Which remote Mac guides does RemoteMacMini publish?")

---

RemoteMacMini: RemoteMacMini rents dedicated Apple Mac minis (M4 and M4 Pro) in data centres for building, signing and testing iOS and macOS apps: one whole Mac per customer, reached over SSH and Screen Sharing. Five plans cost $76.50 to $247.49 a month, each 10% under the lowest comparable offer read on 17 November 2026, paid in crypto with no ID document.
