July 18, 2024
Transferring from altool to notarytool for Mac notarization

That is an replace to my 2018 article The best way to notarize your software program on macOS.

I’ve been utilizing altool to notarize my Mac apps for some years. Nonetheless Apple, being Apple, have deprecated altool in favour of the brand new notarytool. altool will cease working sooner or later in 2023. And Apple, being Apple, have made little try and hold consistency between the 2.

I didn’t discover something on-line to inform me how arguments between the 2 instruments associated. Consequently I spent some time attempting to guess which arguments mapped to which. I acquired locked out for some time for attempting to improper mixture too many instances. Ultimately I went from this:

xcrun altool -t osx -f <mydmg>.dmg --primary-bundle-id <com.firm.product> --notarize-app --username <apple-account-email> --password <password>

... look ahead to approval electronic mail ...

xcrun altool --username <apple-account-email> --password <password> --notarization-info <RequestUUID>

To this:

xcrun notarytool submit <mydmg>.dmg --apple-id <apple-account-email> --team-id <teamid> --password <password> --verbose --wait 

On the plus facet the --wait possibility doesn’t exit till the notarization is full, which suggests you may simply do you complete construct, signal and notarize course of in a single script. Hoorah.

Be aware that you simply nonetheless have to run the ‘stapling’ step after notarization:

xcrun stapler staple -v <mydmg>.dmg

Extra particulars on notarytool arguments at: