Called by the main function to create and run the application.
- macOS 10.0+
The number of arguments in the
An array of pointers containing the arguments passed to the application at startup.
This method never returns a result code. Instead, it calls the
exit function to exit the application and terminate the process. If you want to determine why the application exited, you should look at the result code from the
exit function instead.
Creates the application, loads the main nib file from the application’s main bundle, and runs the application. You must call this function from the main thread of your application, and you typically call it only once from your application’s
main function. Your
main function is usually generated automatically by Xcode.
NSApplication itself ignores the
argv arguments. Instead, Cocoa gets its arguments indirectly through
_NSGet (see <crt_externs.h>).