{"id":32914,"date":"2021-06-21T16:00:02","date_gmt":"2021-06-21T20:00:02","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=32914"},"modified":"2021-07-26T15:15:18","modified_gmt":"2021-07-26T19:15:18","slug":"altool-update-and-notarytool","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/06\/21\/altool-update-and-notarytool\/","title":{"rendered":"altool Update and notarytool"},"content":{"rendered":"<p><a href=\"https:\/\/twitter.com\/rosyna\/status\/1401925148266024963\">Rosyna Keller<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/rosyna\/status\/1401925148266024963\">\n<p>So here&rsquo;s a thread of some new stuff in Xcode 12.5&rsquo;s altool 4.047.1207[&#8230;]<\/p>\n<p>[&#8230;]<\/p>\n<p>For any altool invocation that accepts <code>-p @keychain<\/code>, you can now use <code>--keychain &lt;path to keychain.keychain-db&gt;<\/code> to specify the keychain db to store to or retrieve from.<\/p>\n<p>[&#8230;]<\/p>\n<p>If you&rsquo;re cursed with DSL or another type of connection that doesn&rsquo;t let you do ANYTHING if you saturate an upload connection, there&rsquo;s a new <code>--throttle &lt;Kbps&gt;<\/code> option that lets you set a max Kbps value, as an integer.<\/p>\n<p>I can&rsquo;t remember if this is very new, but there&rsquo;s a new <code>--show-progress<\/code> option that shows progress during altool operations and doesn&rsquo;t require you to use <code>--verbose<\/code>.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2021\/10261\/\">Apple<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2021\/10261\/\">\n<p>Notarization works in tandem with macOS to help people safely download software for their Mac outside of the App Store. Discover how <code>notarytool<\/code> can help you quickly and easily notarize your Mac app for distribution. We&rsquo;ll show you how you can now notarize your apps with just a single command, and how to bring notarization into your continuous integration workflows.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/rosyna\/status\/1402065462641364997\">Rosyna Keller<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/rosyna\/status\/1402065462641364997\"><p><code>altool<\/code> is effectively deprecated for notarization (but not for the App Store!). The new normal is <code>notarytool<\/code> and the <a href=\"https:\/\/developer.apple.com\/documentation\/security\/notarizing_macos_software_before_distribution\/customizing_the_notarization_workflow\">docs<\/a> have been updated to discuss <code>notarytool<\/code>.<\/p>\n<p><code>notarytool<\/code> includes such neat features as a <code>wait<\/code>\/<code>--wait [sub]command<\/code> that replaces manually manual polling in <code>altool<\/code>. When enabled, <code>notarytool<\/code> only returns on error, or if the submission has been fully processed and it reaches a final state (Accepted, Invalid, et cetera)<\/p>\n<p>[&#8230;]<\/p>\n<p>Unlike <code>altool<\/code>, <code>notarytool<\/code> has zero external dependencies other than a base macOS install. You can even grab the Xcode 13 Command Line Tools installer, extract <code>notarytool<\/code>, and run it on any Mac running macOS 10.15.7 or later, without installing full Xcode.<\/p>\n<p>The fact <code>notarytool<\/code>, like <code>stapler<\/code>, is a standalone binary means you can put it on a server without having to install Xcode to use it.<\/p>\n<p>[&#8230;]<\/p>\n<p>The notice of altool deprecation and the altool-specific docs are now on their <a href=\"https:\/\/developer.apple.com\/documentation\/security\/notarizing_macos_software_before_distribution\/customizing_the_notarization_workflow\/notarizing_apps_from_the_command_line_with_xcode_12_and_earlier\">own page<\/a>.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/rosyna\/status\/1402103372967145491\">Rosyna Keller<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/rosyna\/status\/1402103372967145491\"><p>It supports webhooks too (<code>--webhook &lt;callback url&gt;<\/code>) but the process for that hasn&rsquo;t been fully documented yet. There&rsquo;s just a small aside in the new notarization documentation that it&rsquo;s a valid option. So if you don&rsquo;t want to use wait, you can be asynchronously notified.<\/p><\/blockquote>\n\n<p>I&rsquo;m still seeing lots of cases where <code>altool<\/code> gets stuck, and the upload never finishes. It eventually logs an error and exits, but the process reports success, which confuses my build script. Then I can&rsquo;t try it again without doing a new build because it thinks an upload is already in progress. Hopefully <code>notarytool<\/code> will work better.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/06\/07\/wwdc-2021-links\/\">WWDC 2021 Links<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/06\/02\/slow-testing-with-xcode-12-5-and-big-sur\/\">Slow Testing With Xcode 12.5 and Big Sur<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/02\/02\/xcode-12-5-beta\/\">Xcode 12.5 Beta<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/04\/02\/altool-4-01\/\">altool 4.01<\/a><\/li>\n<\/ul>\n\n<p id=\"altool-update-and-notarytool-update-2021-07-02\">Update (2021-07-02): <a href=\"https:\/\/eclecticlight.co\/2021\/06\/24\/will-changes-to-notarization-make-any-difference\/\">Howard Oakley<\/a>:<\/p>\n<blockquote cite=\"https:\/\/eclecticlight.co\/2021\/06\/24\/will-changes-to-notarization-make-any-difference\/\">\n<p>She also said that the Notary service has been streamlined, and now has a dedicated backend which should be both more reliable and faster. Performance targets are for notarization to be completed within 15 minutes for 98% of submissions, and most to be finished in less than 5 minutes.<\/p>\n<\/blockquote>\n<p>The main issue I have is that uploading fails so frequently that it often takes me multiple tries and over an hour to submit a build. Only then does the 5&#x2013;15 minutes start counting.<\/p>\n\n<p id=\"altool-update-and-notarytool-update-2021-07-06\">Update (2021-07-06): <a href=\"https:\/\/scriptingosx.com\/2021\/07\/notarize-a-command-line-tool-with-notarytool\/\">Armin Briegel<\/a>:<\/p>\n<blockquote cite=\"https:\/\/scriptingosx.com\/2021\/07\/notarize-a-command-line-tool-with-notarytool\/\">\n<p>When Apple introduced notarization with Catalina, I published <a href=\"https:\/\/scriptingosx.com\/2019\/09\/notarize-a-command-line-tool\/\">a post describing how to notarize a command line tool<\/a>. At WWDC this year, Apple introduced updates to this process with Xcode 13 (currently in beta). Most importantly, there is a new command line tool called <code>notarytool<\/code>.<\/p>\n<\/blockquote>\n\n<p>I have been seeing better reliability with <code>altool<\/code> since switching the transport from DAV to HTTPS.<\/p>\n\n<p id=\"altool-update-and-notarytool-update-2021-07-26\">Update (2021-07-26): <a href=\"https:\/\/cutecoder.org\/programming\/new-xcode-13-notarization\/\">Sasmito Adibowo<\/a>:<\/p>\n<blockquote cite=\"https:\/\/cutecoder.org\/programming\/new-xcode-13-notarization\/\">\n<p>Now it&rsquo;s time to look at all those developer tools Apple delivered and see how it can improve our work as software engineers.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Rosyna Keller: So here&rsquo;s a thread of some new stuff in Xcode 12.5&rsquo;s altool 4.047.1207[&#8230;] [&#8230;] For any altool invocation that accepts -p @keychain, you can now use --keychain &lt;path to keychain.keychain-db&gt; to specify the keychain db to store to or retrieve from. [&#8230;] If you&rsquo;re cursed with DSL or another type of connection that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2021-06-21T20:00:24Z","apple_news_api_id":"e5fc4a22-16cb-4353-bbad-2ecc7becf733","apple_news_api_modified_at":"2021-07-26T19:15:23Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAw==","apple_news_api_share_url":"https:\/\/apple.news\/A5fxKIhbLQ1O7rS7Me-z3Mw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[1583,30,1666,1891,2077,1842,71,226],"class_list":["post-32914","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-keychain","tag-mac","tag-macos-10-15","tag-macos-11-0","tag-macos-12","tag-notarization","tag-programming","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/32914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=32914"}],"version-history":[{"count":5,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/32914\/revisions"}],"predecessor-version":[{"id":33227,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/32914\/revisions\/33227"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=32914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=32914"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=32914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}