macOS notarization: altool cannot be found
Asked Answered
C

3

17

I wanted to start building a notarization automation script.

However, when I try to use the 'xcrun altool' in Terminal, I get the following error:

xcrun: error: unable to find utility "altool", not a developer tool or in PATH

I'm on macOS 10.14.5, Xcode 10.2.1.

I then especially downloaded and installed Xcode Command Line Tools - still get same error.

Other tools like stapler do work.

I checked this dir and altool is not there: /Library/Developer/CommandLineTools/usr/bin

Any idea what's going on?

Thanks!

Caresa answered 14/6, 2019 at 20:27 Comment(1)
the solution was to reset the command line tools path with xcode-select -rCaresa
G
19

You might try xcode-select -r to reset your xcode selection.

Gangplank answered 16/6, 2019 at 9:30 Comment(0)
C
12

I tried the accepted answer and it did not work. However, what did work was the following:

  1. Go to Xcode
  2. Go to Preferences
  3. Click on Locations
  4. Go to the Command Line Tools popup menu and click on it to choose the Xcode version you want, particularly if it is blank or even if it has an option selected (see comment below).
  5. Under it, now it should show a path, whose default is: /Applications/Xcode.app

This did the trick for me.

Condensed answered 5/6, 2021 at 12:41 Comment(2)
I was having the issue when trying to use Visual Studio for Mac, this helped fix the problem. Only difference, I went in to the Locations and the CommandLineTools was already populated, I clicked it and re-selected (only option anyway) closed Xcode and my build in Visual Studio for Mac workedTweak
I edited my answer to include your feedback, which I think it is important to know.Condensed
A
5

For me the solution was to install complete XCode. I had been getting the error message because I had installed only XCode Command Line Tools and naively thought that altool (being a command line tool) will be there.

Alunite answered 10/8, 2021 at 21:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.