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.

Presentify

Take your presentation to the next level.

FaceScreen

Put your face and name on your screen.

ToDoBar

Your to-dos on your menu bar.

Ram Patra Published on August 11, 2022
Image placeholder

Keep reading

If this article was helpful, others might be too

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 :)

question xcode apple October 1, 2024 xcrun: error: unable to find utility simctl, not a developer tool or in PATH

The error message you’re encountering indicates that the simctl utility is not recognized, which usually means that your command line tools are not properly configured or that the path to Xcode’s command line tools is not set correctly. Here are steps to resolve this issue:

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.