Cocoa is
Apple
An apple is a round, edible fruit produced by an apple tree (''Malus'' spp.). Fruit trees of the orchard or domestic apple (''Malus domestica''), the most widely grown in the genus, are agriculture, cultivated worldwide. The tree originated ...
's native
object-oriented application programming interface
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
(API) for its
desktop
A desktop traditionally refers to:
* The surface of a desk (often to distinguish office appliances that fit on a desk, such as photocopiers and printers, from larger equipment covering its own area on the floor)
Desktop may refer to various compu ...
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
.
Cocoa consists of the
Foundation Kit
The Foundation Kit, or just Foundation for short, is an Objective-C framework in the OpenStep specification described by NeXT Computer, Inc.. It provides basic classes such as wrapper classes and data structure classes. This framework uses the ...
,
Application Kit, and
Core Data frameworks, as included by the
Cocoa.h
header file, and the libraries and frameworks included by those, such as the C standard library and the Objective-C runtime.
[Mac Technology Overview: OS X Frameworks](_blank)
Developer.apple.com. Retrieved on September 18, 2013.
Cocoa applications are typically developed using the development tools provided by Apple, specifically
Xcode
Xcode is a suite of developer tools for building apps on Apple devices. It includes an integrated development environment (IDE) of the same name for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, tvOS, and visionOS. It w ...
(formerly
Project Builder) and
Interface Builder (now part of Xcode), using the
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s
Objective-C
Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was ...
or
Swift
Swift or SWIFT most commonly refers to:
* SWIFT, an international organization facilitating transactions between banks
** SWIFT code
* Swift (programming language)
* Swift (bird), a family of birds
It may also refer to:
Organizations
* SWIF ...
. However, the Cocoa programming environment can be accessed using other tools. It is also possible to write Objective-C Cocoa programs in a simple
text editor
A text editor is a type of computer program that edits plain text. An example of such program is "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be used to c ...
and build it manually with
GNU Compiler Collection
The GNU Compiler Collection (GCC) is a collection of compilers from the GNU Project that support various programming languages, Computer architecture, hardware architectures, and operating systems. The Free Software Foundation (FSF) distributes ...
(GCC) or
Clang
Clang () is a compiler front end for the programming languages C, C++, Objective-C, Objective-C++, and the software frameworks OpenMP, OpenCL, RenderScript, CUDA, SYCL, and HIP. It acts as a drop-in replacement for the GNU Compiler ...
from the command line or from a
makefile
In software development, Make is a command-line interface software tool that performs actions ordered by configured Dependence analysis, dependencies as defined in a configuration file called a ''makefile''. It is commonly used for build automati ...
.
For
end user
In product development, an end user (sometimes end-user) is a person who ultimately uses or is intended to ultimately use a product. The end user stands in contrast to users who support or maintain the product, such as sysops, system administrato ...
s, Cocoa
applications are those written using the Cocoa programming environment. Such applications usually have a familiar look and feel, since the Cocoa programming environment provides a lot of common
UI elements (such as buttons, scroll bars, etc.), and automates many aspects of an application to comply with Apple's
human interface guidelines.
For
iOS,
iPadOS,
tvOS
tvOS (formerly Apple TV Software) is an operating system developed by Apple for the Apple TV, a digital media player. In the first-generation Apple TV, Apple TV Software was based on Mac OS X. The software for the second-generation and later ...
, and
watchOS
watchOS is the operating system of the Apple Watch, developed by Apple Inc., Apple. It is based on iOS, the operating system used by the iPhone, and has many similar features. It was released on April 24, 2015, along with the Apple Watch, the o ...
, APIs similar to Application Kit, named
UIKit and WatchKit, are available; they include
gesture recognition,
animation
Animation is a filmmaking technique whereby still images are manipulated to create moving images. In traditional animation, images are drawn or painted by hand on transparent celluloid sheets to be photographed and exhibited on film. Animati ...
, and a different set of
graphical control elements that are designed to accommodate the specific platforms they target. Foundation Kit and Core Data are also available in those operating systems. It is used in
applications for Apple devices such as the
iPhone
The iPhone is a line of smartphones developed and marketed by Apple that run iOS, the company's own mobile operating system. The first-generation iPhone was announced by then–Apple CEO and co-founder Steve Jobs on January 9, 2007, at ...
, the
iPod Touch
The iPod Touch (stylized as iPod touch) is a discontinued line of iOS-based mobile devices designed and formerly marketed by Apple Inc. with a touchscreen-controlled user interface. As with other iPod models, the iPod Touch can be used as a po ...
, the
iPad
The iPad is a brand of tablet computers developed and marketed by Apple Inc., Apple that run the company's mobile operating systems iOS and later iPadOS. The IPad (1st generation), first-generation iPad was introduced on January 27, 2010. ...
, the
Apple TV
Apple TV is a digital media player and a microconsole developed and marketed by Apple. It is a small piece of networking hardware that sends received media data such as video and audio to a TV or external display. Its media services include ...
, and the
Apple Watch
The Apple Watch is a brand of smartwatch products developed and marketed by Apple Inc., Apple. It incorporates activity tracker, fitness tracking, Health (Apple), health-oriented capabilities, and wireless telecommunication, and integrates wit ...
.
History
Cocoa continues the lineage of several
software framework
In computer programming, a software framework is a software abstraction that provides generic functionality which developers can extend with custom code to create applications. It establishes a standard foundation for building and deploying soft ...
s (mainly the ''App Kit'' and ''Foundation Kit'') from the
NeXTSTEP
NeXTSTEP is a discontinued object-oriented, multitasking operating system based on the Mach kernel and the UNIX-derived BSD. It was developed by NeXT, founded by Steve Jobs, in the late 1980s and early 1990s and was initially used for its ...
and
OpenStep
OpenStep is an object-oriented application programming interface (API) specification developed by NeXT. It provides a framework for building graphical user interfaces (GUIs) and developing software applications. OpenStep was designed to be plat ...
programming environments developed by
NeXT
NeXT, Inc. (later NeXT Computer, Inc. and NeXT Software, Inc.) was an American technology company headquartered in Redwood City, California that specialized in computer workstations for higher education and business markets, and later develope ...
in the 1980s and 1990s. Apple acquired NeXT in December 1996, and subsequently went to work on the
Rhapsody operating system that was to be the direct successor of
OPENSTEP
OpenStep is an object-oriented application programming interface (API) specification developed by NeXT. It provides a framework for building graphical user interfaces (GUIs) and developing software applications. OpenStep was designed to be plat ...
. It was to have had an emulation base for
classic Mac OS
Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Mac (computer), Macintosh family of personal computers by Apple Computer, Inc. from 1984 to 2001, starting with System 1 and end ...
applications, named ''Blue Box''. The OpenStep base of libraries and binary support was termed ''Yellow Box''. Rhapsody evolved into Mac OS X, and the Yellow Box became Cocoa. Thus, Cocoa classes begin with the letters ''NS'', such as NSString or NSArray. These stand for the original proprietary term for the OpenStep framework, NeXTSTEP.
Much of the work that went into developing OpenStep was applied to developing Mac OS X, Cocoa being the most visible part. However, differences exist. For example, NeXTSTEP and OpenStep used
Display PostScript for on-screen display of text and graphics, while Cocoa depends on Apple's
Quartz
Quartz is a hard, crystalline mineral composed of silica (silicon dioxide). The Atom, atoms are linked in a continuous framework of SiO4 silicon–oxygen Tetrahedral molecular geometry, tetrahedra, with each oxygen being shared between two tet ...
(which uses the
Portable Document Format
Portable document format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating syste ...
(PDF) imaging model, but not its underlying technology). Cocoa also has a level of Internet support, including the NSURL and
WebKit
WebKit is a browser engine primarily used in Apple's Safari web browser, as well as all web browsers on iOS and iPadOS. WebKit is also used by the PlayStation consoles starting with the PS3, the Tizen mobile operating systems, the Amazon K ...
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
classes, and others, while OpenStep had only rudimentary support for managed network connections via NSFileHandle classes and
Berkeley sockets
A Berkeley ( BSD) socket is an application programming interface (API) for Internet domain sockets and Unix domain sockets, used for inter-process communication (IPC). It is commonly implemented as a library of linkable modules. It originated wi ...
.
The API toolbox was originally called “Yellow Box” and was renamed to Cocoa - a name that had been already trademarked by Apple. Apple's ''Cocoa'' trademark had originated as the name of a multimedia project design application for children. The name was intended to evoke "Java for kids", as it ran embedded in web pages. The original "Cocoa" program was discontinued following the return of
Steve Jobs
Steven Paul Jobs (February 24, 1955 – October 5, 2011) was an American businessman, inventor, and investor best known for co-founding the technology company Apple Inc. Jobs was also the founder of NeXT and chairman and majority shareholder o ...
to Apple. At the time, Java was a big focus area for the company, so “Cocoa” was used as the new name for “Yellow Box” because, in addition to the native Objective-C usage, it could also be accessed from Java via a bridging layer. Even though Apple discontinued support for the Cocoa Java bridge, the name continued and was even used for the
Cocoa Touch
UIKit is an application development environment and graphical user interface toolkit from Apple Inc. used to build apps for the iOS, iPadOS, watchOS, tvOS, and visionOS operating systems.
UIKit provides an abstraction layer of iOS, the ...
API.
Memory management
One feature of the Cocoa environment is its facility for managing dynamically allocated memory.
Foundation Kit
The Foundation Kit, or just Foundation for short, is an Objective-C framework in the OpenStep specification described by NeXT Computer, Inc.. It provides basic classes such as wrapper classes and data structure classes. This framework uses the ...
's NSObject class, from which most classes, both vendor and user, are derived, implements a
reference counting scheme for memory management. Objects that derive from the NSObject root class respond to a
retain
and a
release
message, and keep a retain count. A method titled
retainCount
exists, but contrary to its name, will usually not return the exact retain count of an object. It is mainly used for system-level purposes. Invoking it manually is not recommended by Apple.
A newly allocated object created with
alloc
or
copy
has a retain count of one. Sending that object a
retain
message increments the retain count, while sending it a
release
message decrements the retain count. When an object's retain count reaches zero, it is deallocated by a procedure similar to a C++ ''destructor''.
dealloc
is not guaranteed to be invoked.
Starting with Objective-C 2.0, the Objective-C runtime implemented an optional
garbage collector, which is now obsolete and deprecated in favor of
Automatic Reference Counting
Automatic Reference Counting (ARC) is a memory management feature of the Clang compiler providing automatic reference counting for the Objective-C and Swift (programming language), Swift programming languages. At compile time, it inserts into the o ...
(ARC). In this model, the runtime turned Cocoa
reference counting operations such as "retain" and "release" into
no-ops. The garbage collector does not exist on the
iOS implementation of Objective-C 2.0. Garbage collection in Objective-C ran on a low-priority background thread, and can halt on Cocoa's user events, with the intention of keeping the user experience responsive. The legacy garbage collector is still available on Mac OS X version 10.13, but no Apple-provided applications use it.
In 2011, the
LLVM
LLVM, also called LLVM Core, is a target-independent optimizer and code generator. It can be used to develop a Compiler#Front end, frontend for any programming language and a Compiler#Back end, backend for any instruction set architecture. LLVM i ...
compiler introduced
Automatic Reference Counting
Automatic Reference Counting (ARC) is a memory management feature of the Clang compiler providing automatic reference counting for the Objective-C and Swift (programming language), Swift programming languages. At compile time, it inserts into the o ...
(ARC), which replaces the conventional garbage collector by performing static analysis of Objective-C source code and inserting retain and release messages as necessary.
Main frameworks
Cocoa consists of three
Objective-C
Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was ...
object libraries called ''
frameworks''. Frameworks are functionally similar to
shared libraries, a compiled object that can be dynamically loaded into a program's address space at runtime, but frameworks add associated resources, header files, and documentation. The Cocoa frameworks are implemented as a type of
bundle, containing the aforementioned items in standard locations.
* ''
Foundation Kit
The Foundation Kit, or just Foundation for short, is an Objective-C framework in the OpenStep specification described by NeXT Computer, Inc.. It provides basic classes such as wrapper classes and data structure classes. This framework uses the ...
'' (''Foundation''), first appeared in Enterprise Objects Framework on NeXTSTEP 3. It was developed as part of the OpenStep work, and subsequently became the basis for OpenStep's AppKit when that system was released in 1994. On macOS, Foundation is based on
Core Foundation
Core Foundation (also called CF) is a C application programming interface (API) written by Apple Inc. for its operating systems, and is a mix of low-level routines and wrapper functions. Most Core Foundation routines follow a certain naming c ...
. Foundation is a generic object-oriented library providing
string and value manipulation,
containers
A container is any receptacle or enclosure for holding a product used in storage, packaging, and transportation, including shipping.
Things kept inside of a container are protected on several sides by being inside of its structure. The term ...
and
iteration
Iteration is the repetition of a process in order to generate a (possibly unbounded) sequence of outcomes. Each repetition of the process is a single iteration, and the outcome of each iteration is then the starting point of the next iteration.
...
,
distributed computing
Distributed computing is a field of computer science that studies distributed systems, defined as computer systems whose inter-communicating components are located on different networked computers.
The components of a distributed system commu ...
,
event loops (run loops), and other functions that are not directly tied to the graphical user interface. The "NS" prefix, used for all classes and
constants in the framework, comes from Cocoa's OPENSTEP heritage, which was jointly developed by NeXT and
Sun Microsystems
Sun Microsystems, Inc., often known as Sun for short, was an American technology company that existed from 1982 to 2010 which developed and sold computers, computer components, software, and information technology services. Sun contributed sig ...
.
* ''
Application Kit'' (''AppKit'') is directly descended from the original NeXTSTEP Application Kit. It contains code programs can use to create and interact with
graphical user interface
A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
s. AppKit is built on top of Foundation, and uses the same ''NS'' prefix.
* ''
Core Data'' is the object persistence framework included with Foundation and Cocoa and found in Cocoa.h.
A key part of the Cocoa architecture is its comprehensive views model. This is organized along conventional lines for an application framework, but is based on the
Portable Document Format
Portable document format (PDF), standardized as ISO 32000, is a file format developed by Adobe in 1992 to present documents, including text formatting and images, in a manner independent of application software, hardware, and operating syste ...
(PDF) drawing model provided by
Quartz
Quartz is a hard, crystalline mineral composed of silica (silicon dioxide). The Atom, atoms are linked in a continuous framework of SiO4 silicon–oxygen Tetrahedral molecular geometry, tetrahedra, with each oxygen being shared between two tet ...
. This allows creating custom drawing content using
PostScript
PostScript (PS) is a page description language and dynamically typed, stack-based programming language. It is most commonly used in the electronic publishing and desktop publishing realm, but as a Turing complete programming language, it c ...
-like drawing commands, which also allows automatic printer support and so forth. Since the Cocoa framework manages all the clipping, scrolling, scaling and other chores of drawing graphics, the programmer is freed from implementing basic infrastructure and can concentrate on the unique aspects of an application's content.
Model–view–controller
The
Smalltalk
Smalltalk is a purely object oriented programming language (OOP) that was originally created in the 1970s for educational use, specifically for constructionist learning, but later found use in business. It was created at Xerox PARC by Learni ...
teams at
Xerox PARC eventually settled on a design philosophy that led to easy development and high code reuse. Named ''
model–view–controller
Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divides the related program logic into three interconnected elements. These elements are:
* the model, the internal representat ...
'' (MVC), the concept breaks an application into three sets of interacting object classes:
* Model classes represent problem domain data and operations (such as lists of people/departments/budgets; documents containing sections/paragraphs/footnotes of stylized text).
* View classes implement visual representations and affordances for human-computer interaction (such as scrollable grids of captioned icons and pop-up menus of possible operations).
* Controller classes contain logic that surfaces model data as view representations, maps affordance-initiated user actions to model operations, and maintains state to keep the two synchronized.
Cocoa's design is a fairly, but not absolutely strict application of MVC principles. Under OpenStep, most of the classes provided were either high-level View classes (in AppKit) or one of a number of relatively low-level model classes like NSString. Compared to similar MVC systems, OpenStep lacked a strong model layer. No stock class represented a "document," for instance. During the transition to Cocoa, the model layer was expanded greatly, introducing a number of pre-rolled classes to provide functionality common to desktop applications.
In Mac OS X 10.3, Apple introduced the NSController family of classes, which provide predefined behavior for the controller layer. These classes are considered part of the
Cocoa Bindings system, which also makes extensive use of protocols such as
Key-Value Observing and
Key-Value Binding. The term 'binding' refers to a relationship between two objects, often between a view and a controller. Bindings allow the developer to focus more on declarative relationships rather than orchestrating fine-grained behavior.
With the arrival of Mac OS X 10.4, Apple extended this foundation further by introducing the
Core Data framework, which standardizes change tracking and persistence in the model layer. In effect, the framework greatly simplifies the process of making changes to application data, undoing changes when necessary, saving data to disk, and reading it back in.
In providing framework support for all three MVC domains, Apple's goal is to reduce the amount of boilerplate or "glue" code that developers have to write, freeing up resources to spend time on application-specific features.
Late binding
In most object-oriented languages, calls to methods are represented physically by a pointer to the code in memory. This restricts the design of an application since specific ''command handling'' classes are needed, usually organized according to the
chain-of-responsibility pattern. While Cocoa retains this approach for the most part, Objective-C's
late binding opens up more flexibility.
Under Objective-C, methods are represented by a ''selector'', a string describing the method to call. When a message is sent, the selector is sent into the Objective-C runtime, matched against a list of available methods, and the method's ''implementation'' is called. Since the selector is text data, this lets it be saved to a file, transmitted over a network or between processes, or manipulated in other ways. The implementation of the method is looked up at runtime, not compile time. There is a small performance penalty for this, but late binding allows the same selector to reference different implementations.
By a similar token, Cocoa provides a pervasive data manipulation method called ''key-value coding'' (KVC). This allows a piece of data or property of an object to be looked up or changed at runtime by name. The property name acts as a key to the value. In traditional languages, this late binding is impossible. KVC leads to great design flexibility. An object's type need not be known, yet any property of that object can be discovered using KVC. Also, by extending this system using something Cocoa terms ''key-value observing'' (KVO), automatic support for
undo-redo is provided.
Late static binding is a variant of binding somewhere between static and dynamic binding. The binding of names before the program is run is called static (''early''); bindings performed as the program runs are dynamic (''late'' or ''virtual'').
Rich objects
One of the most useful features of Cocoa is the powerful ''base objects'' the system supplies. As an example, consider the Foundation classes
NSString
and
NSAttributedString
, which provide
Unicode
Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
strings, and the
NSText
system in AppKit, which allows the programmer to place string objects in the GUI.
NSText
and its related classes are used to display and edit strings. The collection of objects involved permit an application to implement anything from a simple single-line text entry field to a complete multi-page, multi-column text layout schema, with full professional
typography
Typography is the art and technique of Typesetting, arranging type to make written language legibility, legible, readability, readable and beauty, appealing when displayed. The arrangement of type involves selecting typefaces, Point (typogra ...
features such as
kerning
In typography, kerning is the process of adjusting the spacing between Character (symbol), characters in a Typeface#Proportion, proportional font, usually to achieve a visually pleasing result. Kerning adjusts the space between individual le ...
,
ligatures, running text around arbitrary
shape
A shape is a graphics, graphical representation of an object's form or its external boundary, outline, or external Surface (mathematics), surface. It is distinct from other object properties, such as color, Surface texture, texture, or material ...
s,
rotation
Rotation or rotational/rotary motion is the circular movement of an object around a central line, known as an ''axis of rotation''. A plane figure can rotate in either a clockwise or counterclockwise sense around a perpendicular axis intersect ...
, full Unicode support, and
anti-aliased glyph
A glyph ( ) is any kind of purposeful mark. In typography, a glyph is "the specific shape, design, or representation of a character". It is a particular graphical representation, in a particular typeface, of an element of written language. A ...
rendering. Paragraph layout can be controlled automatically or by the user, using a built-in "
ruler
A ruler, sometimes called a rule, scale, line gauge, or metre/meter stick, is an instrument used to make length measurements, whereby a length is read from a series of markings called "rules" along an edge of the device. Usually, the instr ...
" object that can be attached to any text view. Spell checking is automatic, using a system-wide set of language dictionaries. Unlimited undo/redo support is built in. Using only the built-in features, one can write a text editor application in as few as 10 lines of code. With new controller objects, this may fall towards zero.
When extensions are needed, Cocoa's use of Objective-C makes this a straightforward task. Objective-C includes the concept of
categories" which allows modifying existing class "in-place". Functionality can be accomplished in a category without any changes to the original classes in the framework, or even access to its source. In other common languages, this same task requires deriving a new subclass supporting the added features, and then replacing all instances of the original class with instances of the new subclass.
Implementations and bindings
The Cocoa frameworks are written in
Objective-C
Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was ...
. Java
bindings for the Cocoa frameworks (termed the ''Java bridge'') were also made available with the aim of replacing Objective-C with a more popular language but these bindings were unpopular among Cocoa developers and Cocoa's message passing semantics did not translate well to a statically-typed language such as Java. Cocoa's need for runtime binding means many of Cocoa's key features are not available with Java. In 2005, Apple announced that the Java bridge was to be deprecated, meaning that features added to Cocoa in macOS versions later than 10.4 would not be added to the Cocoa-Java programming interface.
At
Apple Worldwide Developers Conference
The Worldwide Developers Conference (WWDC) is an information technology conference held annually by Apple Inc. The conference is currently held at Apple Park in California. The event is used to showcase new software and technologies in the macO ...
(WWDC) 2014, Apple introduced a new programming language named
Swift
Swift or SWIFT most commonly refers to:
* SWIFT, an international organization facilitating transactions between banks
** SWIFT code
* Swift (programming language)
* Swift (bird), a family of birds
It may also refer to:
Organizations
* SWIF ...
, which is intended to replace Objective-C.
AppleScriptObjC
Originally, AppleScript Studio could be used to develop simpler Cocoa applications. However, as of Snow Leopard, it has been deprecated. It was replaced with AppleScriptObjC, which allows programming in
AppleScript, while using Cocoa frameworks.
Other bindings
The Cocoa programming environment can be accessed using other tools with the aid of
bridge mechanisms such as
PasCocoa
Free Pascal Compiler (FPC) is a compiler for the closely related programming-language dialects Pascal (programming language), Pascal and Object Pascal. It is free software released under the GNU General Public License, witexception clausesthat a ...
,
PyObjC,
CamelBones,
RubyCocoa, and a
D/Objective-C Bridge.
Third-party bindings available for other languages include
AppleScript,
Clozure CL,
Monobjc and
NObjective (
C#),
Cocoa# (CLI), Cocodao and
D/Objective-C Bridge,
LispWorks,
Object Pascal
Object Pascal is an extension to the programming language Pascal (programming language), Pascal that provides object-oriented programming (OOP) features such as Class (computer programming), classes and Method (computer programming), methods.
T ...
,
CamelBones (
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language".
Perl was developed ...
),
PyObjC (
Python),
FPC PasCocoa (
Lazarus and
Free Pascal),
RubyCocoa (
Ruby
Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
).
A Ruby language implementation named
MacRuby, which removes the need for a bridge mechanism, was formerly developed by Apple, while
Nu is a
Lisp
Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation.
Originally specified in the late 1950s, ...
-like language that uses the
Objective-C
Objective-C is a high-level general-purpose, object-oriented programming language that adds Smalltalk-style message passing (messaging) to the C programming language. Originally developed by Brad Cox and Tom Love in the early 1980s, it was ...
object model directly, and thus can use the Cocoa frameworks without needing a binding.
Other implementations
There are also open source implementations of major parts of the Cocoa framework, such as
GNUstep
GNUstep is a free software implementation of the Cocoa (formerly OpenStep) Objective-C frameworks, widget toolkit, and application development tools for Unix-like operating systems and Microsoft Windows. It is part of the GNU Project.
GNUst ...
and Cocotron,
Cocotron
free software implementation of Cocoa. which allow cross-platform
Within computing, cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several Computing platform, computing platforms. Some ...
Cocoa application development to target other operating systems, such as Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
and Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
.
See also
References
Bibliography
* Aaron Hillegass: ''Cocoa Programming for Mac OS X'', Addison-Wesley, 3rd Edition 2008, Paperback, .
* Stephen Kochan: ''Programming in Objective-C'', Sams, 1st Edition 2003, Paperback, .
* Michael Beam, James Duncan Davidson: ''Cocoa in a Nutshell'', O'Reilly, 1st Edition 2003, Paperback, .
* Erick Tejkowski: ''Cocoa Programming for Dummies'', 1st Edition 2003, Paperback, .
*
* Paris Buttfield-Addison, Jon Manning: ''Learning Cocoa with Objective-C'', O'Reilly, 3rd Edition 2012, Paperback, .
* Scott Anguish, Erik M. Buck, Donald A. Yacktman: ''Cocoa Programming'', Sams, 1st Edition 2002, Paperback, .
* Erik M. Buck, Donald A. Yacktman: ''Cocoa Design Patterns'', Addison-Wesley Professional, 1st Edition 2009, Paperback,
* Bill Cheeseman: ''Cocoa Recipes for Mac OS X'', Peachpit Press, 1st Edition 2002, Paperback, .
*Andrew Duncan: ''Objective-C Pocket Reference, O'Reilly'', 1st Edition 2002, Paperback, .
External links
Mac Developer Library, Cocoa Layer
Apple's documentation
iDevApps
Mac programming forum
*
Cocoa Dev
Stack Overflow: Cocoa
{{Widget toolkits
MacOS APIs
Apple Inc. developed frameworks