Cocoa Frameworks

The Cocoa and Cocoa Touch frameworks that power OS X and iOS are tightly integrated into the Xcode development experience. Cocoa’s high-level APIs make it easy to add animation, networking, and the native platform appearance and behavior to your application with only a few lines of code.

Cocoa Frameworks

The Cocoa frameworks consist of libraries, APIs, and runtimes that form the development layer for all of OS X. By developing with Cocoa, you will be creating applications the same way OS X itself is created. Your application will automatically inherit the great behaviors and appearances of OS X, with full access to the underlying power of the UNIX operating system. Using Cocoa with the Xcode IDE is simply the best way to create native Mac applications.

The Power of Objective-C

Much of Cocoa is implemented in Objective-C, an object-oriented language that is compiled to run at incredible speed, yet employs a truly dynamic runtime making it uniquely flexible. Because Objective-C is a superset of C, it is easy to mix C and even C++ into your Cocoa applications.

As your application runs, the Objective-C runtime instantiates objects based on executing logic—not just in ways defined during compilation. For example, a running Objective-C application can load an interface (a nib file created by Interface Builder), connect the Cocoa objects in the interface to your application code, then run the correct method once the UI button is pressed. No recompiling is necessary.

Cocoa Uses the Model-View-Controller Design Pattern

Cocoa uses the Model-View-Controller (MVC) design pattern throughout. Models encapsulate application data, Views display and edit that data, and Controllers mediate the logic between the two. By separating responsibilities in this manner, you end up with an application that is easier to design, implement, and maintain.

The MVC pattern means that Interface Builder requires no code to be written or generated while you focus exclusively on the View of your application. Cocoa bindings on the Mac eliminate most of the glue code, making the connection between Controllers coded in Xcode and the Views designed within Interface Builder a simple matter of graphically “wiring” the two together. Interface Builder works with Cocoa to make localizing your application easy so you can quickly enter entirely new markets.

Features List: Frameworks by Category

Cocoa includes primary frameworks such as AppKit and Core Foundation that provide common building blocks for all Mac applications, as well as specialized frameworks for everything from networking and data to graphics and professional audio processing. These frameworks range from high-level Objective-C APIs that can create amazing effects in a few lines of code, down to low-level frameworks to manipulate every aspect of the core system. Here is a small sampling of available frameworks provided by Cocoa:

Audio and Video

  • AV Kit
  • AV Foundation
  • Core Video
  • Core Audio
  • Audio Units

Data Management

  • Core Data

Graphics and Animation

  • Core Animation
  • Core Image
  • OpenGL
  • Scene Kit
  • Sprite Kit
  • Quartz

Networking and Internet

  • Bonjour
  • Directory Services
  • Kerberos

User Applications

  • Address Book
  • Calendar Store
  • Instant Message