Returns the application instance, creating it if it doesn’t exist yet.
- macOS 10.0+
The shared application object.
This method also makes a connection to the window server and completes other initialization. Your program should invoke this method as one of the first statements in
main(); this invoking is done for you if you create your application with Xcode. To retrieve the
NSApplication instance after it has been created, use the global variable
NSApp or invoke this method.