// 31 july 2015 #import "osxaltest.h" @interface appDelegate : NSObject @end @implementation appDelegate - (void)applicationDidFinishLaunching:(NSNotification *)note { } - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)a { return YES; } @end int main(int argc, char *argv[]) { NSApplication *app; app = [NSApplication sharedApplication]; [app setActivationPolicy:NSApplicationActivationPolicyRegular]; [app setDelegate:[appDelegate new]]; [app run]; return 0; }