I have created the simple Cocoa application (Mac OS X 10.6) and there have appeared the entry point:
int main(int argc, char *argv[])
{
return NSApplicationM
Use +[NSProcessInfo processInfo]
and -[NSProcessInfo arguments]
.
In your application delegate,
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSArray *args = [[NSProcessInfo processInfo] arguments];
// use -objectAtIndex: to obtain an element of the array
// and -count to obtain the number of elements in the array
}