Jan 01 ADC Direct
Volume Number: 17 (2001)
Issue Number: 1
Column Tag: ADC Direct
Getting Started with Mac OS X
By Tim Holmes
The first and more important thing you should know about Mac OS X is that it is coming soon! A public beta of Mac OS X was released in September and Apple will deliver the first commercial release of Mac OS X in early 2001. For overall information about Mac OS X and developers, please visit:
http://developer.apple.com/macosx/
This article presents you with many options for Mac OS X development. Ultimately, however, you will need to make your own choices, factoring in current code base, time to market concerns, and platforms to be supported.
The Apple Developer Connection
is pleased to present a new series of articles specifically designed to help facilitate your Mac OS X development. In the upcoming months, Apple's Technology Managers will present articles covering topics such as
the Cocoa and Carbon APIs, Apple's new development tools, I/O Kit, Quartz, Aqua, and more.
These articles will present an overview of key Mac OS X technologies with pointers to online resources from Apple that provide more in-depth information. Accompanying the feature articles will be sidebars and helper articles to help you more effectively navigate Apple's technical documentation and to teach you shortcuts and tips that will improve your code and accelerate your development.
Whether you've already investigated moving your products to Mac OS X or not, these articles should help you get started and resolve open issues.
Forks in the Road
Before you begin, you will need to know the answers to the following:
- What platforms will you support -
Mac OS 9, Mac OS X, Unix, Windows?
- Are you writing an application, a driver, creating a system extension, etc?
- Do you have a preexisting code-base? How large is it? Is it in need of an overhaul?
Your answers to these questions will help you choose the most effective development path, and ultimately deliver a better Mac OS X product.
Let's begin with the most common scenario; you're a Mac OS application developer who already has code based on Mac OS 9 or earlier. There are two most likely paths for you. You may use Carbon, the modern set of APIs founded on the traditional Mac OS APIs, or you may use Cocoa, the newer Mac OS X-only object-oriented APIs.
Carbon
The best route for your product depends primarily on your time to market and platform needs. While Cocoa allows you to build your application more efficiently and quickly, you may not have the time to rewrite your application in a new framework. If this is the case, Carbon may be your best route. You can find out how to get started carbonizing your application at:
http://developer.apple.com/techpubs/macosx/Carbon/carbon.html
Cocoa
If you have the time to redesign your application to take advantage of a modern object-oriented framework and would like to produce a Mac OS X-only application, the rapid development tools and robust Cocoa framework will let you create a superior Mac OS X product.
If you currently have very little code written or none at all, and you are interested in creating a Mac OS X-only solution, then you should investigate Cocoa. It's definitely worth investing the short amount of time it takes to come up to speed. For information on Cocoa development, visit:
http://developer.apple.com/techpubs/macosx/Cocoa/CocoaTopics.html
Driver Development
On the hardware side, the I/O Kit for Mac OS X provides Mac developers with a new, much easier way to create drivers. Remember, however,
that what you may have once thought of as a driver under Mac OS 9 may not be considered a driver under Mac OS X. You can find out all you need to know on this topic under the Kernel heading at:
http://developer.apple.com/techpubs/macosx/macosx.html
System Extensions
Finally, if you are considering extending or customizing the operating system, there are numerous ways to do so. In order to create a more stable platform, some changes were made to Mac OS X that make the methods you may have used for Mac OS 9 no longer applicable. For more information about this topic, please see:
http://developer.apple.com/technotes/tn/tn2003.html
New to the Mac?
Because Mac OS X combines support for a variety of technologies beyond those typically associated with the Mac, it presents non-Mac developers with some interesting new opportunities as well.
Java Developers
Mac OS X has an incredible implementation of Java 2, providing you with a consumer desktop platform for your Java applications and applets. If you wish to create a Windows/Mac OS compatible solution, Java very well may be your best route. What's more, via JFC/Swing, you can get Mac OS X's Aqua interface for free. You'll find information and documentation on Java development on Mac OS X at:
http://developer.apple.com/techpubs/java/java.html
UNIX Developers
If you already have a UNIX code base, Mac OS X presents a great opportunity for you. You can quite easily move your application to Mac OS X by taking advantage of the FreeBSD 4.4 APIs that Mac OS X is based upon. If you wish to quickly get your product up and running on Mac OS, simply port your application to these APIs. However, if you are interested in attracting current Macintosh users, you should move the engine of your product over to Mac OS X, and write a Cocoa GUI that will take advantage of Mac OS X's features. To accomplish this, see the Cocoa documentation mentioned above and the BSD documentation below:
http://www.unix-systems.org/online.html
http://www.netbsd.org
http://www.freebsd.org
XWindows Developers
If you have an XWindows product, then you're in luck as Tenon's XTools allows an XWindows solution to run unmodified, while still taking advantage of some of the native Aqua features of Mac OS X. For information on Tenon's product, visit:
http://www.tenon.com/products/xtools/pre-release_beta/
Discounts on Mac OS X Migration
Bring Your Apps to Mac OS X
With Mac OS X Public Beta here, and the commercial release just over the horizon, Mac developers everywhere have a huge need for Carbon and Cocoa application porting, Aqua user interface implementation, and driver development services. Several high-quality software engineering firms, in association with the Apple Developer Connection, are offering these services at very attractive discounts to all ADC Select and Premier members.
http://developer.apple.com/mkt/macosxmigration.html
End-User Tech Support
We all know how expensive and time consuming it is to set up and maintain a comprehensive customer tech support department. To support developers in their migration to Mac OS X, 877MacTank has designed an exclusive and affordable tech support staffing program for ADC Premier and Select members.
http://developer.apple.com/mkt/mactank.html
Until Next Time
Each of these paths to Mac OS X has alternatives, pros and cons, and each may fit one developer's needs better than another's. Once you have fully investigated your options and decided which path is right for you, it's time to get to work. And yes, there is work to be done, but that is where we can help you succeed.
We'll be covering more specific technologies in the upcoming articles. In the meantime, we welcome your suggestions on how to make how to make these articles more useful for you. Feel free to send email to me, Tim Holmes, at <shortstop@apple.com> with your comments.
See You Next Month.
Tim Holmes is Manager of the Mac OS Technology Management group in Apple Worldwide Developer Relations. He's in his 6th year at Apple, having spent the past four in the role of Mac OS Evangelist for Mac OS 7.6 through Mac OS 9. Tim has been in the Macintosh industry for over a decade, dating back to his work at BMUG, and has been an Apple user for over 23 years.
New Mac OS X Related Releases
Worldwide Public Beta Developer Tools
Developers may download the Mac OS X Worldwide Public Beta Developer Tools version from the Download Software area of the ADC Member Site. This download must be used with the Mac OS X Public Beta User CD (the 7-language version), available from the Apple Store. This software set supports 7 languages including Spanish, Italian, & Japanese. ADC Select and Premier members were sent this CD set in October.
http://connect.apple.com/
Latest CarbonLib SDK
The CarbonLib SDK provides all the files needed to begin Carbon development. ADC Members may download the latest prerelease version from the Download Software area of the ADC Member Site.
http://connect.apple.com/
Apple Memory Guide November 2000
The Apple Memory Guide (AMG) contains memory upgrade information for Macintosh computers and LaserWriter printers.
http://asu.info.apple.com/swupdates.nsf/artnum/n10084/
Automatic Update Software 1.2
Automatic Update Software 1.2 provides enhancements to make software updates over the Internet faster and more efficient.
http://asu.info.apple.com/swupdates.nsf/artnum/n11862/
Developer Documentation
The following new and updated documentation is available to help you on your way to successful Mac OS X application and peripheral development at:
http://developer.apple.com/techpubs/
- Carbon Specification
- Font Management for Carbon and Mac OS 9
- Guidelines for Writing Help Tags
- Adopting the Aqua Interface
- TN1173 - Understanding Open Transport Asset Tracking
- TN1104 - Interrupt-Safe Routines
- TN2007 - The CGDirectDisplay API
- TN2008 - The CGDirectPalette API
- Q&A DV45 - Coordinating Deferred Tasks and Secondary Interrupts
- Q&A QD61 - GetPortBitMapForCopyBits
- Q&A QD62 - CalcCMask and SeedCFill in Carbon
- Q&A QD63 - Finding the Bit Depth of a Carbon Printing Manager Graphics Context
- Q&A QD64 - ATSUI and MLTE Printing
- Q&A QD65 - QDFlushPortBuffer
- Q&A QD66 - Replacing OpenPort in Carbon
Did You Know?
Developer Help Center
When it comes to programming for Mac OS X, do you feel like an explorer on the shore of a vast new continent? Don't worry, there are "charts" to guide you-the developer documentation you get when you install the Developer package.
You can access this information through the Developer Help Center, a section of the Help Viewer application. To get to it, first open the (user) Help Center by choosing Mac Help from the Finder menu. Then click the "Developer Help Center" link at the bottom of the page.
The Developer Help Center works just like a Web browser. You can either navigate through the sets of documentation by clicking links or you can search for specific information. Searching is as simple as typing text (phrases, words, or API symbols) in the field at the top of the application and clicking the Ask button. The search engine returns a weighted list of "hits" (links) you can browse through. The Developer Help Center also lets you focus your searches on the set of documentation you are interested in. Thus a search when you are perusing Carbon documentation confines the results to Carbon. If the results yield nothing of interest, you can easily expand the search to the complete set of documentation.
There are some known bugs in the Public Beta version of Help Viewer; see the release notes for details.
Upcoming Seminars and Events
For more information on Apple developer events
please visit the Developer Events page at
http://developer.apple.com/events/
Training and Seminars
Developer-Related Conferences
- MACWORLD Expo San Francisco 2001
January 9-12, 2001
Macworld Conference & Expo provides you with the opportunity to introduce both business professionals and consumers to your company and products. Special MACWORLD Conference & Expo exhibitor packages including hardware discounts are available for ADC Premier and Select members.
http://developer.apple.com/mkt/mwsf2001.html
- MACWORLD Expo Tokyo 2001
February 22- 24, 2001 at Makuhari Messe, Japan
MACWORLD Conference & Expo Tokyo provides you with the ideal venue to introduce your company and products to over 200,000 eager attendees. Special exhibitor packages and hardware discounts for ADC Premier and Select members are available.
http://developer.apple.com/mkt/mwtokyo2001.html
ADC Programs and Mac OS X
The Apple Developer Connection (ADC) helps Macintosh developers build, test, market, and distribute software and hardware products for Mac OS X. ADC Program members receive advance copies of Mac OS X software and development tools such as Project Builder and Interface Builder directly from Apple.
Programs range in price from $0 to $3500 and are available worldwide. Certain levels of membership entitle developers to benefits such as pre-release software seeds, Apple hardware discounts, technical support, ADC Television, and passes to the Worldwide Developers Conference. Special ADC Member Discounts, included with membership, may be used for third-party services including Mac OS X
migration, Aqua and Cocoa integration, quality assurance, application porting, and more. In addition, members receive discounts on developer products such as WebObjects and the WWDC Conference Sessions on DVD.
And when your Mac OS X product is ready to ship, ADC helps spread the word. Apple's Macintosh Products Guide highlights developer products that are "Built for Mac OS X" or "Classic Compatible". If you offer developer tools or services, we'll also list your products in the weekly ADC News.
For details on program membership, visit:
http://developer.apple.com/membership/