Help center › CI/CD and automation

Notarize a Mac app

Submit with notarytool, wait for the result, and staple the ticket.

For a Mac app you distribute outside the App Store, signed with your Developer ID. Apple’s command-line steps:

1. Save your credentials once

xcrun notarytool store-credentials "notarytool-password" \
  --apple-id "you@example.com" --team-id TEAMID \
  --password app-specific-password

Use an app-specific password from your Apple Account, not your normal password.

2. Submit and wait

ditto -c -k --keepParent MyApp.app MyApp.zip
xcrun notarytool submit MyApp.zip --keychain-profile "notarytool-password" --wait

Most submissions finish within 5 minutes. If it’s rejected, xcrun notarytool log <id> --keychain-profile "notarytool-password" log.json says why.

3. Staple

xcrun stapler staple MyApp.app

You can’t staple a ZIP: staple the app (or DMG or package), then zip it again for distribution.

Related

Use your Mac as a GitHub Actions runnerRegister a self-hosted runner and run it as a service so it survives reboots.Use your Mac as a GitLab RunnerInstall GitLab Runner for Apple silicon, register it with the shell executor and run it as a service.Code signing in CI buildsImport your signing certificate and provisioning profile into a temporary keychain for each job.

Still stuck?

Signed-in customers can message us from the portal; we reply within 24 hours on business days (AEST).