Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing command line arguments in Objective-C

Is there any complete documentation (the interface is present in crt_externs.h) about this functions : _NSGetArgc and _NSGetArgv I can't get any documentation on the apple website about this functions.

like image 939
iPadDevloperJr Avatar asked Feb 28 '11 19:02

iPadDevloperJr


1 Answers

If all you need to do is get the command line arguments in Cocoa, you can do:

NSArray *arguments = [[NSProcessInfo processInfo] arguments]; 
like image 183
Wevah Avatar answered Oct 14 '22 16:10

Wevah