<<

Apple Developer Connection Direct

Getting Started with Mac OS X

he first and more important thing you should know about Forks in the Road Mac OS X is that it is coming soon! A public beta of Mac OS X Before you begin, you will need to know Twas released in September and Apple will deliver the first the answers to the following: commercial release of Mac OS X in early 2001. For overall informa- tion about Mac OS X and developers, please visit: • What platforms will you support - http://developer.apple.com/macosx/ Mac OS 9, Mac OS X, , Windows? • Are you writing an application, a driv- This article presents you with many options for Mac OS X devel- er, creating a system extension, etc? opment. Ultimately, however, you will need to make your own • Do you have a preexisting code-base? choices, factoring in current code base, time to market concerns, How large is it? Is it in need of an overhaul? and platforms to be supported. Your answers to these questions will help you choose the most effective development path, and ultimately deliver a better Mac OS X product. The Apple Developer Connection Let’s begin with the most common scenario; you’re a Mac OS is pleased to present a new series of articles application developer who already has code based on Mac OS 9 or specifically designed to help facilitate your earlier. There are two most likely paths for you. You may use Carbon, the modern set of founded on the traditional Mac OS APIs, or Mac OS X development. In the upcoming you may use Cocoa, the newer Mac OS X-only object-oriented APIs. months, Apple’s Technology Managers will present articles covering topics such as Carbon the Cocoa and Carbon APIs, Apple’s new The best route for your product depends primarily on your time to development tools, I/O Kit, , Aqua, market and platform needs. While Cocoa allows you to build your and more. application more efficiently and quickly, you may not have the time These articles will present an overview of 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 key Mac OS X technologies with pointers to carbonizing your application at: online resources from Apple that provide http://developer.apple.com/techpubs/macosx/Carbon/carbon.html more in-depth information. Accompanying the feature articles will be sidebars and helper Cocoa articles to help you more effectively navigate If you have the time to redesign your application to take advantage Apple’s technical documentation and to teach of a modern object-oriented framework and would like to produce a you and tips that will improve your Mac OS X-only application, the rapid development tools and robust Cocoa framework will let you create a superior Mac OS X product. code and accelerate your development. If you currently have very little code written or none at all, and Whether you’ve already investigated mov- you are interested in creating a Mac OS X-only solution, then you ing your products to Mac OS X or not, these should investigate Cocoa. It’s definitely worth investing the short articles should help you get started and amount of time it takes to come up to speed. For information on resolve open issues. Cocoa development, visit: http://developer.apple.com/techpubs/macosx/Cocoa/ CocoaTopics.html

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 industry for over a decade, dating back to his work at BMUG, and has been an Apple user for over 23 years. Updates from the Apple Developer Connection January 2001

Driver Development For information on Tenon’s product, visit: On the hardware side, the I/O Kit for Mac OS X provides Mac developers http://www.tenon.com/products/xtools/pre-release_beta/ 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 Until Next Time may not be considered a driver under Mac OS X. You can find out all Each of these paths to Mac OS X has alternatives, pros and cons, you need to know on this topic under the Kernel heading at: and each may fit one developer’s needs better than another’s. Once http://developer.apple.com/techpubs/macosx/macosx.html 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 System Extensions done, but that is where we can help you succeed. Finally, if you are considering extending or customizing the operat- We’ll be covering more specific technologies in the upcoming ing system, there are numerous ways to do so. In order to create a articles. In the meantime, we welcome your suggestions on how to more stable platform, some changes were made to Mac OS X that make how to make these articles more useful for you. Feel free to make the methods you may have used for Mac OS 9 no longer send email to me, Tim Holmes, at with applicable. For more information about this topic, please see: your comments. http://developer.apple.com/technotes/tn/tn2003.html See You Next Month. 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. Discounts on Mac OS X Migration Developers Mac OS X has an incredible implementation of Java 2, providing you Bring Your Apps to Mac OS X with a consumer desktop platform for your Java applications and With Mac OS X Public Beta here, and the com- 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, mercial release just over the horizon, Mac devel- you can get Mac OS X’s Aqua interface for free. You’ll find informa- opers everywhere have a huge need for Carbon tion and documentation on Java development on Mac OS X at: and Cocoa application porting, Aqua user inter- http://developer.apple.com/techpubs/java/java.html face implementation, and driver development services. Several high-quality engineer- UNIX Developers ing firms, in association with the Apple Developer If you already have a UNIX code base, Mac OS X presents a great Connection, are offering these services at very 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 attractive discounts to all ADC Select and X is based upon. If you wish to quickly get your product up and Premier members. running on Mac OS, simply port your application to these APIs. http://developer.apple.com/mkt/ However, if you are interested in attracting current Macintosh users, macosxmigration.html 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. End-User Tech Support To accomplish this, see the Cocoa documentation mentioned above We all know how expensive and time consuming and the BSD documentation below: it is to set up and maintain a comprehensive cus- http://www.unix-systems.org/online.html http://www.netbsd.org tomer tech support department. To support http://www.freebsd.org developers in their migration to Mac OS X, 877MacTank has designed an exclusive and XWindows Developers affordable tech support staffing program for ADC If you have an XWindows product, then you’re in luck as Tenon’s Premier and Select members. XTools allows an XWindows solution to run unmodified, while still http://developer.apple.com/mkt/mactank.html taking advantage of some of the native Aqua features of Mac OS X. • TN2008 - The CGDirectPalette API New Mac OS X • Q&A DV45 - Coordinating Deferred Tasks and Secondary Related Releases Interrupts • Q&A QD61 - GetPortBitMapForCopyBits • Q&A QD62 - CalcCMask and SeedCFill in Carbon Worldwide Public Beta Developer Tools • Q&A QD63 - Finding the Bit Depth of a Carbon Printing Manager Developers may download the Mac OS X Worldwide Public Beta Graphics Context Developer Tools version from the Download Software area of the • Q&A QD64 - ATSUI and MLTE Printing ADC Member Site. This download must be used with the Mac OS X • Q&A QD65 - QDFlushPortBuffer Public Beta User CD (the 7-language version), available from the • Q&A QD66 - Replacing OpenPort in Carbon . This software set supports 7 languages including Spanish, Italian, & Japanese. ADC Select and Premier members were sent this CD set in October. Did You Know? http://connect.apple.com/ Developer Help Center Latest CarbonLib SDK When it comes to programming for Mac OS X, The CarbonLib SDK provides all the files needed to begin Carbon do you feel like an explorer on the shore of a development. ADC Members may download the latest prerelease vast new continent? Don’t worry, there are “charts” to guide you—the developer documen- version from the Download Software area of the ADC Member Site. tation you get when you install the Developer http://connect.apple.com/ package. You can access this information through the Apple Memory Guide November 2000 Developer Help Center, a section of the Help The Apple Memory Guide (AMG) contains memory upgrade infor- Viewer application. To get to it, first open the mation for Macintosh and LaserWriter printers. (user) Help Center by choosing Mac Help from http://asu.info.apple.com/swupdates.nsf/artnum/n10084/ the menu. Then click the “Developer Help Center” link at the bottom of the page. Automatic Update Software 1.2 The Developer Help Center works just like a Automatic Update Software 1.2 provides enhancements to make Web browser. You can either navigate through software updates over the Internet faster and more efficient. the sets of documentation by clicking links or http://asu.info.apple.com/swupdates.nsf/artnum/n11862/ you can search for specific information. Searching is as simple as typing text (phrases, Developer Documentation words, or API symbols) in the field at the top of The following new and updated documentation is available to help the application and clicking the Ask . The you on your way to successful Mac OS X application and peripheral search engine returns a weighted list of “hits” (links) you can browse through. The Developer development at: Help Center also lets you focus your searches http://developer.apple.com/techpubs/ on the set of documentation you are interested in. Thus a search when you are perusing • Carbon Specification Carbon documentation confines the results to • Font Management for Carbon and Mac OS 9 Carbon. If the results yield nothing of interest, • Guidelines for Writing Help Tags you can easily expand the search to the com- • Adopting the Aqua Interface plete set of documentation. —————————————————- There are some known bugs in the Public • TN1173 - Understanding Open Transport Asset Tracking Beta version of Help Viewer; see the release • TN1104 - Interrupt-Safe Routines for details. • TN2007 - The CGDirectDisplay API Updates from the Apple Developer Connection January 2001

Upcoming Seminars and Events ADC Programs

For more information on Apple developer events and Mac OS X please visit the Developer Events page at he Apple Developer Connection (ADC) http://developer.apple.com/events/ helps Macintosh developers build, test, Training and Seminars Tmarket, and distribute software and hardware products for Mac OS X. ADC Program • Apple WebObjects Programming Classes members receive advance copies of Mac OS X Five-day programming courses from Apple iServices Group software and development tools such as Project are available worldwide. Check out their schedule at Builder and directly from Apple. http://www.apple.com/iservices/technicaltraining/schedule.html Programs range in price from $0 to $3500 and • Programming WebObjects 1 and 2, and are available worldwide. Certain levels of mem- Programming with Cocoa bership entitle developers to benefits such as Taught by Aaron Hillegass at the Big Nerd Ranch in Asheville, NC pre-release software seeds, Apple hardware dis- Five-day classes for programmers on developing web-based applications. counts, technical support, ADC Television, and http://www.bignerdranch.com/when.html passes to the Worldwide Developers Conference. Special ADC Member Discounts, Developer-Related Conferences included with membership, may be used for

• MACWORLD Expo San Francisco 2001 third-party services including Mac OS X January 9-12, 2001 migration, Aqua and Cocoa integration, quality Macworld Conference & Expo provides you with the opportunity assurance, application porting, and more. In to introduce both business professionals and consumers to your addition, members receive discounts on devel- company and products. Special MACWORLD Conference & Expo exhibitor packages including hardware discounts are available for oper products such as WebObjects and the ADC Premier and Select members. WWDC Conference Sessions on DVD. http://developer.apple.com/mkt/mwsf2001.html And when your Mac OS X product is ready to ship, ADC helps spread the word. Apple’s • MACWORLD Expo Tokyo 2001 February 22- 24, 2001 at Makuhari Messe, Japan Macintosh Products Guide highlights developer MACWORLD Conference & Expo Tokyo provides you with products that are “Built for Mac OS X” or the ideal venue to introduce your company and products to “Classic Compatible”. If you offer developer over 200,000 eager attendees. Special exhibitor packages tools or services, we’ll also list your products in and hardware discounts for ADC Premier and Select members are available. the weekly ADC News. http://developer.apple.com/mkt/mwtokyo2001.html For details on program membership, visit: http://developer.apple.com/membership/