I'm trying to learn how to capture screenshot with Mac OS X'a Cocoa. I found online a very nice example called Son of Grab:
However, I can't figure out how to build it as an app in XCode. When I create a simple command line project it just complains that info.plist is not available. If I create a Cocoa application and just put the 3 files (main.m, Controller.h, Controller.m) into the project, nothing happens.
I did more research and tried to use Controller in my AppDelegate. here's my AppDelegate class
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
self.controller = [[Controller alloc] initWithWindowNibName:@"Controller"];
[self.controller showWindow:self];
}
I created a simple Controller.xib which is just a window. This, however, causes an infinite loop in the awakeFromNib method inside of Controller.m.
I'm quite confused now, and I'm quite new to Cocoa and Objective-C. Any pointers will be greatly appreciated.