clang -fobjc-arc -framework Foundation main.m -o yourAppName
This will compile the code into an executable file. To run, type
at the command line. Alternatively, you can run your program by typing the program name preceded with ./ like so:
Or you can add the name and path to your program to the PATH variable of your system.