Notarizing the macOS Installer Package - aecreations/sync-clippings GitHub Wiki

Requirements

  1. Sign the executable and supporting program files, then build and sign the installer package
  2. Sign in to your Apple Account and create an app-specific password. Make note of it for the steps below
  3. Also make note of your Apple Developer team ID. This can be obtained from the Apple Developer website by logging in and then navigating to "Membership Details"

Instructions

Open Terminal, then navigate to the folder where the signed installer package is located, and run:

xcrun notarytool submit <package filename> --apple-id <your Apple ID> --team-id <your Apple Developer team ID> --password <app-specific password> --wait

The --wait argument will cause the tool to wait until results of the notarization process are returned from Apple.

It's recommended to check the results of notarization to confirm that it was successful, even if the status returned by the preceding command is "Accepted." To do this, note the submission ID (a GUID) in the output from the above command, then run:

xcrun notarytool log <submission ID> --apple-id <your Apple ID> --team-id <your Apple Developer team ID> --password <app-specific password>

Finally, run the following command to embed the notarization data into the installer package:

xcrun stapler staple <package filename>

Running notarytool on macOS 10.15 Catalina

Run notarytool directly, omitting xcrun.