AppKit
| Company type | Software framework |
|---|---|
| Industry | Software development |
| Predecessor | Application Kit |
| Founder | NeXT |
Area served | Software developers |
| Products | Graphical user interface toolkit |
| Parent | Apple Inc. |
AppKit—previously known as Application Kit—is a graphical user interface toolkit initially created to serve as the UI framework for NeXTSTEP. Together with Foundation and Display PostScript, it constituted a fundamental component of the OpenStep API standard. Subsequently, AppKit and Foundation were incorporated into Cocoa, the main Objective-C framework powering macOS. The GNU project’s implementation of OpenStep/Cocoa, called GNUstep, also offers compatibility with AppKit.
The framework is composed of Objective-C classes and protocols designed for building applications within OpenStep/Cocoa environments, and it can be accessed from Swift through its Objective-C interoperability layer. Development using AppKit is facilitated by Apple’s Xcode IDE, which includes tools such as Interface Builder for designing user interfaces visually. AppKit promotes design patterns like reference types, delegation, notifications, target–action mechanisms, and the model–view–controller paradigm. Reflecting its NeXTSTEP heritage, all AppKit classes carry the "NS" prefix.
A majority of native applications on macOS—such as Finder, TextEdit, Calendar, and Preview—are built using AppKit for their graphical user interfaces.
Besides AppKit, Apple’s platforms including iOS, iPadOS, and tvOS provide alternative UI frameworks like UIKit, which is derived from AppKit and shares similar architectural principles, as well as the Swift-exclusive declarative framework SwiftUI. Prior to macOS Catalina, Apple also supported the Carbon UI framework, which was based on the legacy Macintosh Toolbox.
Classes
From more than 170 classes in AppKit, some of the principal ones are:
NSApplication: a singleton class that represents the entire application lifecycle and manages windows along with global application stateNSWindow: encapsulates on-screen windows that hold view hierarchiesNSView: defines rectangular areas responsible for rendering UI content using technologies such as Quartz, Core Animation, and Metal; supports nested views within itselfNSResponder: serves as the base class for event-handling objects;NSApplication,NSWindow, andNSVieware subclasses of this classNSDocument: handles document management including storage on disk and associated window presentationNSController: an abstract controller class that acts as an intermediary between views and data models within an MVC framework
See also
External links
- AppKit classes in OpenStep specification
- AppKit in Apple Developer Documentation