Notarizing with "xcrun altool" - am I doing it right here ??

I've just signed my app and am now notarizing it.

My app was not made within Xcode, and I don't have Xcode installed, so I am using the command prompt.


This is my line in Terminal:

xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "your-username" -p "your-password"


When it says AC_PASSWORD, I assume its my mac password in the login keychain, and the username and other password is my Apple Dev account.


I'm getting zsh: event not found. In fact, I don't know if altool is even present on my Mac, I ran xcrun altool by itself and got an error "unable to find utility altool".

Is altool something I have to install (i.e. do I have to install Xcode for example?)


Afterwards, I intend to perform this:

ditto -c -k --keepParent "dist/My Application.app" dist/MyApplication.zip
xcrun altool --notarize-app -t osx -f dist/MyApplication.zip \
    --primary-bundle-id your.bundle.id -u your-username --password "@keychain:AC_PASSWORD"



Ref:

https://haim.dev/posts/2020-08-08-python-macos-app/

Posted on Sep 27, 2022 8:06 AM

Reply
6 replies

Sep 27, 2022 2:42 PM in response to Bansaw

What is the altool command being input? (Obfuscate the name of the zip and the credentials.)


Does the following command show a wad of text about commands and options?

xcrun altool


Which version of the command line tools is installed? If you're running macOS Monterey 12.6 (current), that'd be Command Line Tools for Xcode 14, or the just-available Xcode 14.0.1 (14A400) app. With recent versions of Xcode and with recent of the command line tools, the following command-line command should show the command line tools version:

xcodebuild -version


For example, here is what the command-line tools installed with Xcode 14.0.1 report:

$ xcodebuild -version
Xcode 14.0.1
Build version 14A400
$ 


If you're on an older version of the command line tools, update your tools. Xcode 14 requires macOS Monterey minimally.

Sep 27, 2022 3:15 PM in response to Bansaw

Bansaw wrote:

Ref:
https://haim.dev/posts/2020-08-08-python-macos-app/

If you have a question about random blog post made over two years ago, you need to ask the author of said blog post.


If you want to notarize an app outside of Xcode, there are instructions posted on the Apple Developer site. You’ll have to find those instructions yourself, but I think it would be a very good exercise to find the source and learn exactly how you are supposed to do these things. Hint: altool is wrong. Apple has deprecated that in favour of notarytool.

Sep 27, 2022 11:22 AM in response to MrHoffman

I found out that I had Xcode command line tools already installed, they just weren't on the $PATH. Now I added them.


My problem is now with this command:

xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "your-username" -p "your-password"


My AC_PASSWORD - which I am assuming is my password on my local user on my machine here - begins with a '!' which I think may be throwing this command line off. I'm not sure what you mean by literal string.

Lets say my password is !Welcome123 . Is that throwing the AC_PASSWORD parameter off? Its giving me the error "event not found Welcome123" - note the missing '!' Do I need to put "\!Welcome123"?


'you-username' and 'your-password' I assume is the username and password to my Apple Dev a/c.

Sep 27, 2022 1:38 PM in response to MrHoffman

Ah... I see what you mean by literal.


Actually I don't think I have altool installed.

There are many xcrun commands that come pre-installed such as staple etc., but I could not fine altool anywhere.

Do you know if I am forced to install the full Xcode package just to get altool, or can I somehow just install a minimum command line edition?

I tried xcode-select --install, but that gave me "command line tools are already installed..."

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Notarizing with "xcrun altool" - am I doing it right here ??

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.