If you need Xcode, File -> New Project ... -> Mac OS X / Application -> Command Line Tool / Foundation.
If you like to use Xcode, this is what I do: use your favorite text editor and type
#import <Foundation/Foundation.h> int main() { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; // whatever code you want to test NSLog(@"hello, world!"); [pool release]; return 0; }
compile the shell (e.g. using Terminal.app) with
clang yourSourceFileName.m -o executableName -framework Foundation
or
gcc yourSourceFileName.m -o executableName -framework Foundation
and then run
./executableName
user557219
source share