Jump to content

AppKit

From Alfawiki
Adapted from the English Wikipedia article AppKit, available under CC BY-SA 4.0Updated 8 August 2025
AppKit
Company typeSoftware framework
IndustrySoftware development
PredecessorApplication Kit
FounderNeXT
Area served
Software developers
ProductsGraphical user interface toolkit
ParentApple 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 state
  • NSWindow: encapsulates on-screen windows that hold view hierarchies
  • NSView: defines rectangular areas responsible for rendering UI content using technologies such as Quartz, Core Animation, and Metal; supports nested views within itself
  • NSResponder: serves as the base class for event-handling objects; NSApplication, NSWindow, and NSView are subclasses of this class
  • NSDocument: handles document management including storage on disk and associated window presentation
  • NSController: an abstract controller class that acts as an intermediary between views and data models within an MVC framework

See also

External links