Import from Address Book, Numbers (iWork '09), Entourage, Excel, and More. Create a print list from imported contacts and let the program do the rest. What is Mac OS X? © Amit Singh. All Rights Reserved. Written in December 2003 Programming on Mac OS X Mac OS X is a fertile field for all kinds of programming endeavors, especially if you have a *nix frame of reference. Life is still much better for a developer on Windows than on Mac OS X - no matter what one might think of the usability, etc. Apple has been trying to improve things for developers lately, which is a good sign. This page discusses some programming facilities, frameworks and tools available on Mac OS X. Application Environments Since Mac OS X is derived from various sources, it has a multitude of Application Environments. We discussed these in. To recapitulate: BSD Mac OS X uses FreeBSD as a reference code base for its BSD derivations (Panther derives from FreeBSD 5.0). It includes a BSD-based POSIX API (BSD style system call vector, uap based argument passing, etc.). An example of intercepting system calls on Mac OS X is covered in the article. OS X also supports System V IPC, asynchronous I/O, poll() (emulated over select()), etc. Arbitrary C programming is not any different than on any generic Unix platform. Here is an example of by overwriting and injecting machine instructions. Carbon This is a set of procedural C-based APIs for Mac OS X that are based on the old Mac OS 9 API (actually dating back as far back as Mac OS 8.1). Carbon was originally designed to provide an easy development migration path from Mac OS 9 to Mac OS X. The Carbon APIs are all-encompassing (they include legacy interfaces), covering most things that you are likely to do programmatically on Mac OS X. Carbon specific code is not portable to other platforms. Classic Mac OS X includes a Classic (Mac OS 9) emulator that executes in a protected memory environment so as to let users run programs written for Mac OS 9. Apple does not encourage you to actually develop for this environment. Cocoa This is an object-oriented Objective-C based API that's the preferred way of doing things in Mac OS X (if what you want to do can be done through Cocoa), particularly because of how well it's supported by Apple's Rapid Development tools. However, there are many parts of Mac OS X, and applications from 3rd party vendors, that have not converted to Cocoa completely, or at all. A Cocoa application can call the Carbon API when necessary. Cocoa is largely based on the OpenStep frameworks, and consists of primarily two parts: the Foundation (fundamental classes) and the Application Kit (classes for GUI elements). Although Cocoa is not really portable across platforms, you might be able to get your Cocoa programs to work on a number of platforms if you take into account. Here's what the has to say about portability between Cocoa and GNUstep (quoted verbatim): It's easier from GNUstep to Cocoa than Cocoa to GNUstep. Cocoa is constantly changing, much faster than GNUstep could hope to keep up. They have added extensions and new classes that aren't available in GNUstep yet. Plus there are some other issues. If you start with Cocoa: • Be careful with Cocoa.h includes (Use #ifndef GNUSTEP, for instance) • Do not use CoreFoundation • Do not use Objective-C++ • Do not use Quicktime or other proprietary extension • You need to convert.nib files (see section ) • Some unfinished classes include NSToolBar and Drawers. My definition of 'portability' (in the current context) is not about feasibility, but the practicality of doing so. Given enough resources, one could port anything to anything - often by emulating/implementing the 'source' API on the 'target'.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2019
Categories |