How to run Xcode binaries from command line
Sure.
If you are using the default settings, you will find the binary in a subdirectory of build
your project.
If you have the location of the common build products specified through settings, you will find the binaries there.
Once you find the binary, open up a terminal window and run it just like any other command.
For Cocoa applications, you need to provide the path in the application shell. Something like:
MyApp.app/Contents/MacOS/MyApp
For example, my settings are set to create everything in /tmp/bbum-products
. This way, if I build a simple command line tool in debug mode, I can go to terminal and type the following to run the embedded executable (obviously from the "somerandomtoolibuilt" project):
/tmp/bbum-products/Debug/somerandomtoolibuilt
And of course it spews:
2009-09-11 00:44:11.164 somerandomtoolibuilt[7585:903] Hello, World!
source to share