Cocoa (Touch)

Cocoa and Cocoa Touch are the application development environments for OS X and iOS, respectively. Both Cocoa and Cocoa Touch include the Objective-C runtime and two core frameworks:

The Frameworks

The Foundation framework implements the root class, NSObject, which defines basic object behavior. It implements classes that represent primitive types (for example, strings and numbers) and collections (for example, arrays and dictionaries). Foundation also provides facilities for internationalization, object persistence, file management, and XML processing. You can use its classes to access underlying system entities and services, such as ports, threads, locks, and processes. Foundation is based on the Core Foundation framework, which publishes a procedural (ANSI C) interface.

You use the AppKit and UIKit frameworks for developing an application’s user interface. These two frameworks are equivalent in purpose but are specific to a platform. They include classes for event handling, drawing, image-handling, text processing, typography, and interapplication data transfer. They also include user-interface elements such as table views, sliders, buttons, text fields, and alert dialogs.

The Language

Objective-C is the native, primary language for developing Cocoa and Cocoa Touch applications. However, projects for Cocoa and Cocoa Touch applications may include C++ and ANSI C code. Additionally, you can develop Cocoa applications using scripting languages that are bridged to the Objective-C runtime, such as PyObjC and RubyCocoa.

Prerequisite Articles


Related Articles

Definitive Discussion