I am Completely new to Objective C and Cocoa programming.
Why does NSApplicationMain not have syntax like
[target selector];
Why We call it like
NSApplicationMain();
Or is this syntax for some sort of global methods ?
I was thinking that all methods in objective-C are on objects, seems like this is one of those global methods,
Seniors in objective-C Please shed some light.
Thanks,
Objective C, at least historically, has been an extension of C.
And if you look at any new app that you create from the templates in Xcode, “
NSApplicationMain()” is called from a main.m or a main.c file.This is a hook to instantiate the Objective C runtime for a Macintosh app, or as the Apple documentation puts it,
NSApplicationMainis:Also, it provides a nice way to bridge the traditional C main function’s “
int argc, const char *argv[]” parameters to a main function into an Objective C application.