A command that quits the specified app.
- macOS 10.0+
The quit command may optionally specify how to handle modified documents (automatically save changes, don’t save them, or ask the user). For details, see the description for the
quit command in "Apple Events Sent By the Mac OS" in How Cocoa Applications Handle Apple Events in Cocoa Scripting Guide.
NSQuit is part of Cocoa’s built-in scripting support. Most applications don’t need to subclass
NSQuit or call its methods.