Mac OS X is an operating system with a modern GUI and application support frameworks layered on top of a UNIX-based core. Because of this design, there are many layers at which you might port your application.
If you want to port a UNIX or Linux application to Mac OS X, you should focus primarily on Darwin. The lowest layer of Mac OS X, Darwin includes the kernel, device drivers and driver support frameworks, a BSD personality layer, and various libraries and command-line utilities.
For GUI developers, Mac OS X provides three primary programming environments: Carbon, Cocoa, and Java.
Carbon is a procedural C-based environment based on classic Mac OS APIs, similar to that of Win32 on Windows and X11 on UNIX/Linux. Cocoa is an Objective-C/Java-based programming environment, including an advanced, object-oriented GUI toolkit. Objective-C allows you to integrate C++ and C code into Cocoa applications, while Java-Cocoa allows you to integrate some Java code. Finally, Mac OS X provides a full Java development kit (JDK), which makes porting Java code easy.
Mac OS X also provides a number of cross-platform APIs such as OpenGL that may be of particular interest if you develop games or other highly graphic-intensive applications.
You can find more information about these environments by reading the getting started pages for Getting Started with Carbon, Getting Started with Cocoa, and Getting Started with Java.
Before you begin porting an application to Mac OS X, you should read Porting and Mac OS X Technology Overview. This will help you familiarize yourself with Mac OS X at a broad, general level.
You should also spend time getting used to the Mac OS X developer tools. A good place to start is by reading Getting Started with Tools & Languages.
There are generally two stages of any porting effort. The first stage is making your application compile on Mac OS X. The second stage is making your application look and feel like a native Mac OS X application.
If you are updating an existing classic Mac OS application, read Getting Started with Carbon. Then read Carbon Porting Guide.
If you are porting a UNIX application to Mac OS X, read Porting UNIX/Linux Applications to Mac OS X.
If you are porting a Windows application to Mac OS X, read Porting to Mac OS X from Windows Win32 API. If you are porting a graphics-intensive application such as a game, you may also be interested in reading Getting Started with Games.
If you want to integrate Carbon code with a Cocoa application (or vice versa), read Carbon-Cocoa Integration Guide.
If you are interested in porting device drivers or other low level technologies, you should look at Getting Started with Darwin and Getting Started with Hardware and Drivers.
For more information on making your application look like other native Mac OS X applications, read Apple Human Interface Guidelines.
The Porting Reference Library includes the following high-level resource pages, which can be bookmarked for easy access.
Conceptual and how-to information for porting.
Focused, detailed descriptions in reference format for porting.
Sample applications demonstrating a wide variety of porting issues and solutions.
Late-breaking documents on issues related to porting.
Programming tips, code snippets, and FAQs by Apple’s support engineers.
Mailing Lists
Apple has several mailing lists for discussing porting topics: To discuss importing UNIX-based software to Mac OS X, join . To discuss Darwin software development, join unix-porting. You may also be interested in discussion of Macintosh games development (mac-games-dev) and OpenGL on the Macintosh (darwin-development). In addition, there are lists for discussing software development in Carbon (mac-opengl) and Cocoa (carbon-development).cocoa-dev
You may also find this website helpful:
Apple’s Open Source Technologies website.
Last updated: 2008-10-15