How to notarize your application step by step

So.., you want to notarize your Mac application and you don’t even know where to start?

This is a simple step by step guide to help you to accomplish that in matter of minutes from console. I’m publishing this after notarizing next version of Turbo Boost Switcher I’m working on since it took me some time and did some mistakes, so decided to share my experience with you all. Hope it helps!! :).

In summary:

And that’s it!.., there’re alternative flows to this one (like using .dmg files instead) but found this one to be the simplest.., at least for me. Now let’s proceed with the details:

  1. Upgrade your Xcode to at least 10.0+ version . The command line tools and graphical ones are only available from this version.
  2. After that, visit Apple ID management web page and generate a specific password in order to use notarization. Follow this guide https://support.apple.com/en-us/HT204397
  3. Now zip your .app folder. After that, let’s send it to Apple using the credentials generated above.

    xcrun altool --notarize-app --primary-bundle-id "$bundle_id" --username "$your_apple_id" --password "$password" --file $your_file.zip

    Just replace the variables $bundle_id, $your_apple_id and $password with the application bundle id (or another one), your apple id username and finally the generated password on the step three. Give it some time in order to upload the file to apple servers.

  4. Once uploaded, you’ll see a request identifier you can use in order to check the notarization status and result. In order to do that, just enter the following command to query for that info, get current status and view errors if any.

    xcrun altool -u "$your_apple_id" -p “$password” --notarization-info $request_id

  5. Finally, it all went fine you’ll receive an email after some minutes containing “You can now distribute your Mac software” as subject. You just need to staple the .app so Gatekeeper can confirm your app is notarized when offline.

    spctl -a -v $the_file.app

And done, you’re good to go!!!. If you need more info, you can check the Apple documentation, use the Xcode directly, etc. Just take a look at the following links:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

3 × 5 =