Using Xcode 14.0.1, I am working on a Command Line Tool project. As long as the command takes no argument it can be run and tested with the Xcode run button.
But I now want to use some arguments, I therefore need to run the command from a terminal.
Here comes my question:
How do I find the path for the command?
CodePudding user response:
Edited because I misread the original question (see comments):
xcodebuild -project yourproj.xcodeproj -showBuildSettings
from the location of your project should have that information. Might want to add a | grep TARGET_BUILD_DIR
to filter for the output directory. It should be ~/Library/Developer/Xcode/DerivedData/projectname-[random-string]/Build/Products/Debug
.
Previous answer about Xcode command line tools:
They should be under /Library/Developer/CommandLineTools/usr/bin
, but xcodebuild
and xcrun
at /usr/bin
, so should be in your PATH
automatically. You can find out for sure with xcode-select --print-path
.