Loading...

How to notarize a dmg or zip file with the help of Xcode's Notary Tool?

question apple app development
Ram Patra Published on August 11, 2022
Xcode 13+

With Xcode 13 and later, notarization via command-line has come down to these 2 basically:

xcrun notarytool store-credentials "<key>" --apple-id "<your apple id>" --team-id <your teamid> --password "<app specific password>"

and

xcrun notarytool submit <your file name>.dmg --keychain-profile "<key>" --wait

The first command is used to create a keychain profile in your Keychain and the second command uses this profile and submits the file (dmg/zip) to Apple for notarization and waits until it gets a response back. You do not need to poll.

It’s a good practice to see the logs even if you get a success response.

xcrun notarytool log <id you get from the response> --keychain-profile "<key>" logs.json

Note: At the time of writing this answer, apple documentation is kind of confusing as they have mentioned using the secret 2FA password instead of the app-specific password. You can go through these steps to create an app specific password (if not already done) before running the first command. Additionally, if you have trouble finding your Team ID then this post from Apple should help.

P.S. I used this wonderful open-source tool to create my dmg file for Presentify app.

Ram Patra Published on August 11, 2022
Image placeholder

Keep reading

If this article was helpful, others might be too

apple October 18, 2021 AirPods 3 vs AirPods Pro

The AirPods 3rd generation was released today that looks quite similar to the AirPods Pro, released in October 2019, but is slightly cheaper than the Pro model. Therefore, let’s see the differences between them.

question apple app development April 5, 2022 How to notarize your app in Xcode?

Submitting your app to the Apple App Store is somewhat “straightforward”, however, if you want to export your app to list it on a 3rd party app store or sell it directly to your customers then you have to notarize your app.

May 28, 2020 Best Mac Apps for Working From Home

For me personally, it is a mixed feeling working from home. On one hand, I have the flexibility with when to work and when not to but on the other hand, it is sometimes hard for me to find that fine line between work and life. There are days when I keep working even after office hours without realizing that I have got my life wife too :)