Mac OS X Advanced Development Techniques

Total Page:16

File Type:pdf, Size:1020Kb

Mac OS X Advanced Development Techniques [ Team LiB ] • Table of Contents • Index Mac OS® X Advanced Development Techniques By Joe Zobkiw Publisher: Sams Publishing Pub Date: April 22, 2003 ISBN: 0-672-32526-8 Pages: 456 Mac OS X Advanced Development Techniques introduces intermediate to advanced developers to a wide range of topics they will not find so extensively detailed anywhere else. The book concentrates on teaching Cocoa development first, and then takes that knowledge and teaches in- depth, advanced Mac OS X development through detailed examples. Topics covered include: writing applications in Cocoa, supporting plug-in architectures, using shell scripts as startup items, understanding property lists, writing screen savers, implementing preference panes and storing global user preferences, custom color pickers, components, core and non-core services, foundations, frameworks, bundles, tools, applications and more. Source code in Objective-C, Perl, Java, shell script, and other languages are included as appropriate. These solutions are necessary when developing Mac OS X software, but many times are overlooked due to their complexities and lack of documentation and examples. The project-oriented approach of Mac OS X Advanced Development Techniques lends itself perfectly to those developers who need to learn a specific aspect of this new OS. Stand-alone examples allow them to strike a specific topic with surgical precision. Each chapter will be filled with snippets of deep, technical information that is difficult or impossible to find anywhere else. [ Team LiB ] Brought to You by Like the book? Buy it! [ Team LiB ] • Table of Contents • Index Mac OS® X Advanced Development Techniques By Joe Zobkiw Publisher: Sams Publishing Pub Date: April 22, 2003 ISBN: 0-672-32526-8 Pages: 456 Copyright Preface About the Author Acknowledgments We Want to Hear from You! Reader Services Foreword Introduction Part I: Overview Chapter 1. Introduction to Mac OS X Darwin UNIX File Systems Industry Standard Protocols Quartz OpenGL QuickTime Classic (OS 9) Carbon Cocoa Java Aqua Software Conclusion Chapter 2. Introduction to Programming in Mac OS X Programming Languages Tools Frameworks Conclusion Part II: Application Level Chapter 3. Cocoa Applications The Result The Project Try This Conclusion Chapter 4. Cocoa Plug-ins The Results The First Project: plistPlugin SearchWindowController The Second Project: MyNSBP_App and MyNSBP_Plugin A Word About Symbol Collisions Try This Conclusion Chapter 5. Carbon Plug-ins The Results The CFPlugin Project What Is a UUID? The CFPlugin Project Source Code The CFPluginCarbonApp Host Application Project The CFPluginCocoaApp Host Application Project Try This Conclusion Chapter 6. Frameworks Apple Frameworks Third-Party Frameworks The Result The Carbon Framework Project The Cocoa Framework Project The Cocoa Application Project Try This Conclusion Part III: Enhancing the System Chapter 7. System Services The Result The Project The Application Connection Try This Conclusion Chapter 8. System Preference Panes The Result The Project More NSPreferencePane Try This Conclusion Chapter 9. Status Items The Result The Project Try This Conclusion Chapter 10. Screen Effects The Result The Project Try This Conclusion Chapter 11. Color Pickers The Result The Project Try This Conclusion Part IV: Advanced Methods Chapter 12. Threads The Result The Project Serial Versus Parallel Thread Priority Thread Data Try This Conclusion Chapter 13. Terminal The Result The Project Try This Conclusion Chapter 14. XML-RPC The Result The PHP Server The PHP Client The Cocoa Client Try This Conclusion Chapter 15. SOAP The Result The PHP Server The PHP Client The Cocoa Client Try This Conclusion Chapter 16. Snippets Calling Carbon from Cocoa Drawing with QuickDraw in a Cocoa Application Displaying the Username Finding a User's Home Directory Finding Application Support Directories Display Alert Panel and Write to Log Updating the Application's Dock Image Updating the Application's Dock Menu Open a URL Get the Icon of a File Scrolling About Box Checking Network Status Checking for Modifier Keys Executing AppleScripts via URL Defaults Find Sample Localizing Your Cocoa Application CURLHandle Conclusion Chapter 17. Conclusion Part V: Appendixes Appendix A. Source Code Chapter 3—RadarWatcher Chapter 4—MyNSBP_App Chapter 4—MyNSBP_Desaturate Chapter 4—MyNSBP_RemoveColor Chapter 4—plistPlugin Chapter 5—CFPlugin Chapter 5—CFPluginCarbonApp Chapter 5—CFPluginCocoaApp Chapter 5—Shared Chapter 6—MyCarbonFramework Chapter 6—MyCocoaFramework Chapter 6—MyCocoaApp Chapter 7—MyTextService Chapter 8—MyPreferencePane Chapter 9—MyStatusItem Chapter 10—MyScreenEffect Chapter 11—MyColorPicker Chapter 12—MyThread Chapter 13—MyTerminal Chapter 14—MyXMLRPC Chapter 15—MySOAP Appendix B. Online Resources Index [ Team LiB ] [ Team LiB ] Copyright Copyright © 2003 by Sams Publishing All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein. Library of Congress Catalog Card Number: 2002116065 Printed in the United States of America First Printing: May 2003 Reprinted with corrections: June 2003 05 04 03 4 3 2 Trademarks All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. Warning and Disclaimer Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an "as is" basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or from the use of the CD or programs accompanying it. Credits Acquisitions Editor Katie Purdum Development Editor Scott Meyers Managing Editor Charlotte Clapp Project Editor Andy Beaster Copy Editor Rhonda Tinch-Mize Indexer Chris Barrick Proofreader Jody Larsen Technical Editor Mike Trent Team Coordinator Vanessa Evans Media Developer Dan Scherf Designer Gary Adair Page Layout Kelly Maish Dedication This book is dedicated to all my friends and family—with a special blessing to those we've lost. [ Team LiB ] [ Team LiB ] Preface About the Author Acknowledgments We Want to Hear from You! Reader Services Foreword [ Team LiB ] [ Team LiB ] About the Author Joe Zobkiw is president of TripleSoft Inc., a software development firm located in Raleigh, NC. He has been writing software for Macintosh, UNIX, and Windows operating systems since 1986. Joe has written numerous technical articles on software development-related topics throughout his career. His experience includes writing communication, utility, and business applications for commercial and private clients. This is his second book on advanced Macintosh software development. [ Team LiB ] [ Team LiB ] Acknowledgments This is the section where I thank all the people who made it possible to write the book you are now holding. Some of them introduced me to someone, some of them worked in the trenches, and some of them didn't complain while I coded for "just a few more minutes." Love and most thanks to Catherine—Go Bucs! Thanks also to Carole McClendon and everyone at Waterside Productions; Kathryn Purdum, Scott Meyers, and everyone at Sams Publishing; Mike Trent for an excellent technical review and foreword; Everyone on the various Cocoa and Mac OS X mailing lists, chat rooms, and Web sites for keeping me in the loop; Apple Computer for designing such great hardware and software and all the folks who work hard to put it together. Also thanks to Jeff Dopko, Bob Levitus, Matt Manlove, Marty Wachter, the Emmi family, the McNair family, and the Zobkiw family. Special note to Marty: There is a hidden chapter in this book. If you read the seventh word of every third sentence, it will tell you how to make an iTunes plug-in. Last, but certainly not least, thanks to you for making this purchase. I know that many books are vying for your earnings, and I'm glad you chose this one. I hope you enjoy it! [ Team LiB ] [ Team LiB ] We Want to Hear from You! As the reader of this book, you are our most important critic and commentator. We value your opinion and want to know what we're doing right, what we could do better, what areas you'd like to see us publish in, and any other words of wisdom you're willing to pass our way. You can email or write me directly to let me know what you did or didn't like about this book—as well as what we can do to make our books stronger. Please note that I cannot help you with technical problems related to the topic of this book, and that due to the high volume of mail I receive, I might not be able to reply to every message. When you write, please be sure to include this book's title and author as well as your name and phone or email address. I will carefully review your comments and share them with the author and editors who worked on the book. Email: [email protected] Mail: Mark Taber Associate Publisher Sams Publishing 201 West 103rd Street Indianapolis, IN 46290 USA [ Team LiB ] [ Team LiB ] Reader Services For more information about this book or others from Sams Publishing, visit our Website at www. samspublishing.com. Type the ISBN (excluding hyphens) or the title of the book in the Search box to find the book you're looking for. [ Team LiB ] [ Team LiB ] Foreword If asked to define Mac OS X in 5 words or less, I would call it "a collection of new beginnings." Some of these beginnings are obvious.
Recommended publications
  • Porting Codewarrior Projects to Xcode
    Porting CodeWarrior Projects to Xcode 2006-09-05 Intel and Intel Core are registered Apple Computer, Inc. trademarks of Intel Corportation or its © 2003, 2006 Apple Computer, Inc. subsidiaries in the United States and other All rights reserved. countries. Java and all Java-based trademarks are No part of this publication may be trademarks or registered trademarks of Sun reproduced, stored in a retrieval system, or Microsystems, Inc. in the U.S. and other transmitted, in any form or by any means, countries. mechanical, electronic, photocopying, recording, or otherwise, without prior OpenGL is a registered trademark of Silicon written permission of Apple Computer, Inc., Graphics, Inc. with the following exceptions: Any person PowerPC and and the PowerPC logo are is hereby authorized to store documentation trademarks of International Business on a single computer for personal use only Machines Corporation, used under license and to print copies of documentation for therefrom. personal use provided that the Simultaneously published in the United documentation contains Apple’s copyright States and Canada. notice. Even though Apple has reviewed this document, The Apple logo is a trademark of Apple APPLE MAKES NO WARRANTY OR Computer, Inc. REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS Use of the “keyboard” Apple logo DOCUMENT, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A (Option-Shift-K) for commercial purposes PARTICULAR PURPOSE. AS A RESULT, THIS without the prior written consent of Apple DOCUMENT IS PROVIDED “AS IS,” AND YOU, THE READER, ARE ASSUMING THE may constitute trademark infringement and ENTIRE RISK AS TO ITS QUALITY AND unfair competition in violation of federal ACCURACY.
    [Show full text]
  • Icem: Un’ Applicazione Per L’Iphone
    massimo cocco icem: un’ applicazione per l’iphone tesi di laurea Relatore: Prof. Paolo Baldan Università degli Studi di Padova Facoltà di Informatica Dipartimento di Scienze Matematiche Naturali MM FF NN Febbraio 2011 I’m never giving in On with the show - Queen - The Show Must Go On - Dedicato a mio nonno. INDICE 1 introduzione 1 1.1 ”Tutto cambia. Di nuovo” 1 1.2 Introduzione al progetto 2 1.2.1 Corporate Energy Mangement Application 2 1.2.2 L’azienda Autoware e iCEM 3 1.2.3 Settori sviluppati dallo studente 5 2 analisi del progetto 7 2.1 Studio di fattibilità 8 3 use case 9 3.1 Use case: Area filter 9 3.2 Use Case: Area risultati 10 3.3 Use case: Area Events 11 3.4 Use case: Dettagli Eventi 12 3.5 Ciclo di vita 13 4 il linguaggio object c 15 4.1 La struttura del linguaggio 15 5 strumenti utilizzati 19 5.1 Xcode 19 5.2 Xcode IDE 19 5.3 Interface Builder 20 5.3.1 Esempio di utilizzo di Interface Builder: Hello World 20 5.4 SQLite & SQLite Database Browser 21 6 progettazione e sviluppo dell’ icem 25 6.1 Connessione iPhone - Server 25 6.2 Database 26 6.3 Sezioni Allarmi ed Eventi 27 6.4 Tab Bar 27 6.5 Sezione Events 29 6.5.1 Area Events 29 6.5.2 Details Events 31 6.5.3 Meters of Events 32 6.6 Sezione Alarms 32 6.6.1 Area Filter 33 6.6.2 Area Set Alarm Order 36 6.6.3 Area Risultati 37 6.6.4 Area Dettagli 38 7 piano di qualifica 41 7.1 Tecniche di verifica 41 7.1.1 Analisi statica 41 7.2 Tecniche di validazione 41 v 7.2.1 Analisi dinamica 41 7.2.2 Test di unità 42 7.2.3 Test di sistema 42 8 conclusioni 43 9 glossario 45 Bibliografia 49 Lista delle Figure 51 vi 1 INTRODUZIONE 1.1 ”tutto cambia.
    [Show full text]
  • Introducing Xcode 5
    Introducing Xcode 5 code is Apple’s free suite of developer tools; it is used to cre- ate applications for iOS mobile devices and for Mac OS X. X Xcode 5, shown in Figure 1.1 , is the most recent version. Developer tools are complex, and Xcode has always tried to hide much of that complexity from novice developers. You can use Xcode in a very simple click-to-build way, but this simplicity can be misleading. Many developers never explore Xcode’s more advanced features and never discover how they can use them to save time, solve problems, or extend their projects with original and creative features. Xcode also includes an unexpectedly enormous selection of helper applications and developer tools. A complete guide to every ele- ment in Xcode would require a shelf of books. This book concen- trates on beginner- and intermediate-level features, but it also includes hints and pointers for advanced developers. Understanding the History of Mac Development Tools In This Chapter Before OS X, Apple’s IDE (Integrated Development Environment) was MPW (Macintosh Programmer’s Workshop). MPW is no longer Understanding the supported, but can still be found on the Internet Archive, as shown history of Mac in Figure 1.2 . development tools Moving to Xcode 5 MPW competed with a commercial development system called CodeWarrior. Both were expensive, and many would-be developers Comparing iOS and OS X were put off by the initial start-up costs. development Looking backCOPYRIGHTED at early IDEs MATERIAL CodeWarrior was based on the Metrowerks C compiler and envi- ronment.
    [Show full text]
  • DISCOVERING OPENSTEP: a Developer Tutorial
    DISCOVERING OPENSTEP: A Developer Tutorial Rhapsody Developer Release Apple Computer, Inc. User Interface Tips copyright © 1997 Apple Computer, Inc. All rights reserved. [6467.00] No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Computer, Inc., except to make a backup copy of any documentation provided on CD-ROM. Printed in the United States of America. The Apple logo is a trademark of Apple Computer, Inc. Use of the “keyboard” Apple logo (Option-Shift-K) for commercial purposes without the prior written consent of Apple may constitute trademark infringement and unfair competition in violation of federal and state laws. No licenses, express or implied, are granted with respect to any of the technology described in this book. Apple retains all intellectual property rights associated with the technology described in this book. This book is intended to assist application developers to develop applications only for Apple-labeled or Apple-licensed computers. Every effort has been made to ensure that the information in this manual is accurate. Apple is not responsible for printing or clerical errors. Apple Computer, Inc. 1 Infinite Loop Cupertino, CA 95014 408-996-1010 Apple, and the Apple logo are trademarks of Apple Computer, Inc., registered in the United States and other countries. NeXT, the NeXT logo, NEXTSTEP, the NEXTSTEP logo, Digital Librarian, NeXTmail, and
    [Show full text]
  • Project Builder for Java
    Project Builder for Java October 10, 2003 Microsystems, Inc. in the U.S. and other Apple Computer, Inc. countries. © 2003, 2004 Apple Computer, Inc. Simultaneously published in the United All rights reserved. States and Canada. Even though Apple has reviewed this manual, No part of this publication may be APPLE MAKES NO WARRANTY OR reproduced, stored in a retrieval system, or REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS MANUAL, transmitted, in any form or by any means, ITS QUALITY, ACCURACY, mechanical, electronic, photocopying, MERCHANTABILITY, OR FITNESS FOR A recording, or otherwise, without prior PARTICULAR PURPOSE. AS A RESULT, THIS MANUAL IS SOLD ªAS IS,º AND YOU, THE written permission of Apple Computer, Inc., PURCHASER, ARE ASSUMING THE ENTIRE with the following exceptions: Any person RISK AS TO ITS QUALITY AND ACCURACY. is hereby authorized to store documentation IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, on a single computer for personal use only OR CONSEQUENTIAL DAMAGES and to print copies of documentation for RESULTING FROM ANY DEFECT OR personal use provided that the INACCURACY IN THIS MANUAL, even if advised of the possibility of such damages. documentation contains Apple’s copyright THE WARRANTY AND REMEDIES SET notice. FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, The Apple logo is a trademark of Apple EXPRESS OR IMPLIED. No Apple dealer, agent, Computer, Inc. or employee is authorized to make any modification, extension, or addition to this Use of the “keyboard” Apple logo warranty. (Option-Shift-K) for commercial purposes Some states do not allow the exclusion or without the prior written consent of Apple limitation of implied warranties or liability for incidental or consequential damages, so the may constitute trademark infringement and above limitation or exclusion may not apply to unfair competition in violation of federal you.
    [Show full text]
  • New Project the Gnustep Developer Guide
    New Project: The GNUstep Developer Guide 1 / 3 New Project: The GNUstep Developer Guide 2 / 3 [ Introduction | State | Documentation | Download ProjectCenter | Related links ] ... It assists you in starting new projects and lets you manage your project files .... Developer documentation is now on its own page. ... GNUstep.it - developer site; Advogato - basic GNUstep project info and links to some developer diaries .... Dismiss. Join GitHub today. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software .... I discovered by searching the interwebs that a significant number of people who try out GNUstep get stuck at the “I wanted to do Objective-C on my Linux so I .... GNUstep. Summary. GNUstep development environment for Fedora. Owner. Name: Jochen Schmitt; email: [email protected]. Current Status.. Georges is a long time Unix user. GNUstep is one of his favourite free software projects. ... It was a complete new way of using a system GUI. GWorkspace is the .... GNUstep is an application development platform, very similar to Apple's Cocoa. ... After Steve Jobs left Apple, his new company, NeXT Computers, developed ... of the NeXTSTEP platform (user interface and programming API) that ... when some hoped that NeXT would give the entire project over to the Free .... Contribute to the Free Software Directory: submit new packages, corrections to ... Please contribute as a user and developer to GNUstep, a free object-oriented .... This article provides an introduction to GNUstep development. ... While creating Cocoa, Apple added new classes that enrich the API. ... From the File menu of Project Builder, select New Project..
    [Show full text]
  • Binaries Should Be Mach-O
    Mac OS X Programming Guidelines 11/28/01 7:56 PM Technical: Developer Documentation: Technical Notes CONTENTS Mac OS X is designed to be a powerful, robust, and versatile operating system. For it Binaries should be Mach-O to live up to its full potential, however, requires Run performance tools on your binary adherence to some specific programming Don't use processor resources unless you have to Use Carbon Events in your Application practices. Avoid using resource forks Use file extensions [Nov 26 2001] Make your code volume-format independent Use bundled resources and Unicode-savvy APIs Investigate using path-based file-system APIs Cocoa: The quickest way to developing the next killer application for Mac OS X Be judicious using C++ for new development References Downloadables Please keep the following points in mind when developing for Mac OS X: Binaries should be Mach-O Mach-O is the native executable format of Mac OS X. This has several implications for code that is compiled into that format, and for code that isn't. Mach-O code gets the most efficient access to all Mac OS X technologies and the best possible integration with system software. Code that isn't Mach-O doesn't. Mach-O is supported by Apple's development tools, CodeWarrior Pro 7 and Absoft Pro Fortran for Mac OS X at the present time. Others are working on it as well. As a developer you have several options for moving to Mach-O: 1. Use Apple Development tools: Apple delivers a complete suite of development tools for Mac OS X: Mach-O code generation with C, C++ and Objective-C languages, complete Carbon, Cocoa and I/O Kit support, full Java development support, Aqua interface design tools, along with debugging and performance analysis tools.
    [Show full text]
  • Programming Mac OS X: a GUIDE for UNIX DEVELOPERS
    Programming Mac OS X: A GUIDE FOR UNIX DEVELOPERS KEVIN O’MALLEY MANNING Programming Mac OS X Programming Mac OS X A GUIDE FOR UNIX DEVELOPERS KEVIN O’MALLEY MANNING Greenwich (74° w. long.) For electronic information and ordering of this and other Manning books, go to www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact: Special Sales Department Manning Publications Co. 209 Bruce Park Avenue Fax: (203) 661-9018 Greenwich, CT 06830 email: [email protected] ©2003 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books they publish printed on acid-free paper, and we exert our best efforts to that end. Manning Publications Co. Copyeditor: Tiffany Taylor 209 Bruce Park Avenue Typesetter: Denis Dalinnik Greenwich, CT 06830 Cover designer: Leslie Haimes ISBN 1-930110-85-5 Printed in the United States of America 12345678910–VHG–05 040302 brief contents PART 1OVERVIEW ............................................................................. 1 1 ■ Welcome to Mac OS X 3 2 ■ Navigating and using Mac OS X 27 PART 2TOOLS ..................................................................................
    [Show full text]
  • Openstep and Solaris
    OpenStep and Solaris A White Paper A Sun Microsystems, Inc. Business 2550 Garcia Avenue Mountain View, CA 94043 TM U.S.A. 1994 Sun Microsystems, Inc., NeXT Computer, Inc. Sunsoft 2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A. NeXT Computer, Inc. 900 Chesapeake Drive, Redwood City, California 94063 U.S.A. NEXTSTEP Release 3 Copyright 1988-1994 NeXT Computer, Inc. All rights reserved. [6453.00] This product and related documentation are protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or related documentation may be reproduced in any form by any means without prior written authorization of NeXT, Sun and their licensors, if any. Portions of this product may be derived from the UNIX® and Berkeley 4.3 BSD systems, licensed from UNIX System Laboratories, Inc. and the University of California, respectively. Third-party font software in this product is protected by copyright and licensed from NeXT’s Font Suppliers. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the United States Government is subject to the restrictions set forth in DFARS 252.227-7013 (c)(1)(ii) and FAR 52.227-19. The product described in this publication may be protected by one or more U.S. patents, foreign patents, or pending applications. TRADEMARKS Sun, Sun Microsystems, the Sun logo, SMCC, the SMCC logo, SunSoft, the SunSoft logo, Solaris, SunOS, OpenWindows, DeskSet, ONC, NFS, NetISAM, and ToolTalk are trademarks or registered trademarks of Sun Microsystems, Inc. NeXT, the NeXT logo, NEXTSTEP, the NEXTSTEP logo, OpenStep, NEXTSTEP Developer, ObjectWare, Portable Distributed Objects, and PDO are trademarks or registered trademarks of NeXT Computer, Inc.
    [Show full text]
  • Carbon: an Essential Element of Mac OS X
    ADC March 2001 2/6/01 1:44 PM Page 1 Apple Developer Connection Direct Carbon: An Essential Element of Mac OS X ne of the things that makes Mac OS X unique is its integra- developers, while at the same time delivering tion of five separate application runtime environments: all the performance, features, and reliability OCarbon, Cocoa, Classic, Java, and BSD. Never before has an that Mac OS X has to offer. About 70 percent operating system offered developers so many options. This series of of the classic Mac OS APIs are fully support- articles will give you the information you need to make an informed ed, and Carbon adds many new APIs specifi- decision as to which of these environments is right for your applica- cally to take advantage of Mac OS X. tion on Mac OS X. This month, I’m going to talk about Carbon and what it offers you as a Macintosh developer. What Diamonds Are Made Of A Brief History of Carbon Carbon offers a wealth of features to support and accelerate your Carbon represents the evolution of the Mac OS API, from a single- Mac OS X development efforts. Whether you’re new to the platform, user, cooperatively scheduled system, to a modern multi-user system or an old-timer, here are some of the reasons why you’ll find Carbon with memory protection and preemptive multitasking. Carbon a solid foundation for your software product: sprang from Apple’s desire to provide a gentle migration path for • Broad Language Support Apple provides interfaces, compilers, and tools for Carbon programming in C and C++, while other languages such as BASIC and FORTRAN are offered by other tool vendors.
    [Show full text]
  • The Cross-Platform Developing Skills for Mac Applications
    The Cross-Platform Developing Skills for Mac Applications Xiao Hanyu1 October 17, 2009 1Computer Science and Technology 0706, Zhejiang University Contents 1 Basics of Mac Platform 3 1.1 Mac OS and iPhone .............................. 3 1.1.1 Introduction to Mac OS ....................... 3 1.1.2 Introduction to iPhone OS ...................... 3 1.1.3 iPhone and iPod Touch ........................ 6 1.2 Before Developing .............................. 6 1.2.1 Darwin (operating system) ..................... 6 1.2.2 Cocoa API ................................ 7 1.2.3 POSIX .................................. 7 1.3 Developing Tools ............................... 7 1.3.1 Xcode .................................. 7 1.3.2 Interface Builder ........................... 8 1.4 Objective-C ................................... 8 1.4.1 Introduction to Objective-C ..................... 8 1.4.2 A Short History of Objective-C ................... 9 1.4.3 Syntax Overview ........................... 10 2 The Cross-Platform Solution 11 2.1 Cygwin ..................................... 11 2.2 Cross-compiling ................................ 11 2.3 Makefile .................................... 13 2.4 GNUstep .................................... 15 2.4.1 Introduction to GNUstep ...................... 15 2.4.2 The Correlative OpenStep ...................... 16 1 CONTENTS CONTENTS 2.4.3 Gorm .................................. 16 2.4.4 ProjectCenter ............................. 17 2.4.5 Window Maker ............................. 17 3 Our First "Hello World" Application
    [Show full text]
  • Gorm and Projectcenter, the Gnustep RAD Tools at the Beginning
    LinuxFocus article number 265 http://linuxfocus.org Gorm and ProjectCenter, the GNUstep RAD tools by Georges Tarbouriech Abstract: <georges.t(at)linuxfocus.org> RAD stands for Rapid Application Development. At the end of the 80's, About the author: when NeXTstep was released, it came with an incredible tool, called InterfaceBuilder. Used in conjunction with another tool, named Georges is a long time Unix ProjectBuilder, it allowed to build graphical applications in a flash. user. He loves GNUstep GNUstep offers a free version of these tools, called Gorm.app and and the tools this great ProjectCenter.app. framework provides. _________________ _________________ _________________ At the beginning... From the computers prehistory, software development has been a great challenge. Computers were quite big in size despite their very little power. They were quite expensive, not really numerous and developers were unable to use them as often as they wished since they had to share them with other people. Then, researchers tried to find a way to make computers execute more than one task at a time to improve efficiency. Obviously, they had to design and create programming languages from scratch, taking into account the poor resources of the available machines. Thus, during the 60's various new programming languages appeared: LISP, FORTRAN, BASIC, Algol68, BCPL, etc. Next came the B language derived from the above mentioned BCPL, which soon became the C language. This last changed the world of programming. The Object Oriented (SmallTalk, Objective C, C++, etc) languages appeared later, with the "graphical era". In the 80's some machines were providing graphical OSes (Apple Macintosh, Commodore Amiga, Atari ST, etc) and the X Window System was in the works.
    [Show full text]