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. Nevertheless Apple, being Apple, have deprecated
altool in favour of the brand new
altool will cease working in some unspecified time in the future in 2023. And Apple, being Apple, have made little try and preserve 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 making an attempt to guess which arguments mapped to which. I acquired locked out for some time for making an attempt to incorrect 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> ... anticipate approval e-mail ... xcrun altool --username <apple-account-email> --password <password> --notarization-info <RequestUUID>
xcrun notarytool submit <mydmg>.dmg --apple-id <apple-account-email> --team-id <teamid> --password <password> --verbose --wait
On the plus facet the
--wait choice doesn’t exit till the notarization is full, which suggests you’ll be able to simply do you complete construct, signal and notarize course of in a single script. Hoorah.
Notice that you just nonetheless must run the ‘stapling’ step after notarization:
xcrun stapler staple -v <mydmg>.dmg
Extra particulars on notarytool arguments at: