Product Details
Xcode 3 Unleashed

Xcode 3 Unleashed
By Fritz Anderson

List Price: $54.99
Price: $34.64 & eligible for FREE Super Saver Shipping on orders over $25. Details

Availability: Usually ships in 24 hours
Ships from and sold by Amazon.com

57 new or used available from $30.00

Average customer review:

Product Description

Apple’s new Xcode 3 is the most powerful Mac development suite ever created. In Xcode 3 Unleashed, renowned Mac developer Fritz Anderson has written the definitive guide to making the most of Xcode 3 to build any Macintosh or iPhone application.

 

Anderson leads you through a simple project that covers the entire Xcode 3.x development lifecycle. You’ll walk through building and debugging command-line tools, creating Mac OS X user interfaces, modeling data, localizing languages, compiling applications, and much more. Along the way, he introduces each of Apple’s remarkable development tools from the latest version of Interface Builder to Instruments—a powerful new tool for analyzing and optimizing your code.

 

Anderson shows how to manage your source code in any environment, whether you’re working solo or participating in a worldwide team. He thoroughly illuminates Xcode 3’s build system and shows how to make the most of Apple’s performance tools, led by the deep and powerful Shark statistical profiler.

 

Systematically updated for Xcode 3.x, this is a comprehensive revision of Anderson’s previous bestseller, Step into Xcode. Its breadth, depth, and practical focus will make it indispensable to every Mac developer: experienced programmers upgrading from Xcode 2 or migrating from CodeWarrior; UNIX/Linux programmers moving to Mac OS X; even new programmers.

 

Detailed information on how to…

  • Succeed with every stage of the Mac OS X application lifecycle
  • Make the most of Xcode 3’s core tools for editing, debugging, testing, and compilation
  • Get the most from new improvements to Interface Builder
  • Create robust applications using the Model-View-Controller paradigm
  • Utilize dynamic libraries and frameworks
  • Build Universal Binaries to run on both Intel and PowerPC Macs
  • Add Spotlight searchability to data files
  • Profile memory, I/O, graphics, and threading in real-time
  • Accelerate both your applications and your development processes
  • Leverage new improvements to the Xcode documentation system
  • Avoid header ambiguity, disappearing links, and other Xcode development pitfalls

Introduction 1

 

Part I: The Life Cycle of a Mac OS X Application

Chapter 1: Kicking the Tires 11

Chapter 2: Simple Workflow and Passive Debugging 19

Chapter 3: Simple Active Debugging 29

Chapter 4: Compilation: The Basics 39

Chapter 5: Starting a Cocoa Application 47

Chapter 6: A Cocoa Application: Views 63

Chapter 7: A Cocoa Application: Controllers 75

Chapter 8: Version Control 93

Chapter 9: Property Lists 117

Chapter 10: Libraries and Dependent Targets 141

Chapter 11: File Packages and Bundles 153

Chapter 12: Unit Testing 167

Chapter 13: Creating a Custom View 181

Chapter 14: Dynamic Libraries and Frameworks 203

Chapter 15: Documentation in Xcode 221

Chapter 16: Using the Data Modeling Tools 243

Chapter 17: Cross-Development 267

Chapter 18: Spotlight (or, How to Build a Plug-in) 281

Chapter 19: Finishing Touches 301

 

Part II: Xcode Tasks

Chapter 20: Navigating an Xcode Project 331

Chapter 21: Xcode for make Veterans 353

Chapter 22: More About Debugging 373

Chapter 23: Xcode and Speed 395

Chapter 24: A Legacy Project 403

Chapter 25: Shark and the CHUD Tools 421

Chapter 26: Instruments 437

Chapter 27: Closing Snippets 461

 

Appendices

Appendix A: Some Build Variables 475

Appendix B: Project and Target Templates 485

Appendix C: Other Resources 501

 

Index 507

 


Product Details

  • Amazon Sales Rank: #109559 in Books
  • Published on: 2008-07-27
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 560 pages

Features


Editorial Reviews

About the Author

Fritz Anderson has been writing software, books, and articles for the Macintosh since 1984. He has worked for research and development firms, consulting practices, and freelanced. He has been admitted to the Indiana bar but thought better of it. He now lives in Chicago, where he works for a large university.

Excerpt. © Reprinted by permission. All rights reserved.
Introduction

Introduction

IN THIS INTRODUCTION

  • What Xcode Is

  • What's New in Xcode 3

  • Obtaining Xcode

  • Installing Xcode

From the moment it first published Mac OS X, Apple, Inc., has made a complete suite of application development tools available to every user of the Macintosh. Since Mac OS X version 10.3, those tools have been led by Xcode, the integrated development environment Apple's own engineers use to develop system software and applications such as Safari, iTunes, Mail, and iChat. If you own a Mac, these same tools are in your hands today.

What's New in Xcode 3

In October 2007, with the introduction of Mac OS X 10.5 (Leopard), Apple introduced version 3 of the Xcode developer tools suite. Among the changes were

  • Extensive improvements to the Xcode integrated development environment (IDE), including

    • Support for Objective-C 2.0, the first major revision to the language, with commands for converting existing code to the new language.

    • Improved syntax coloring, now including distinctive colors for symbols like instance variables and method names.

    • Code Focus, a ribbon beside the editor text that lets you see how blocks of code are organized, and allows you to fold long blocks down to the height of a single line.

    • The projectwide Find command now works through the Spotlight text-searching engine, yielding better results faster.

    • A debugger bar, offering simple debugging controls in any editor window.

    • Datatips, allowing you to inspect the values of program variables during debugging, just by hovering the cursor over them in the code.

    • A mini-debugger, injected into the programs you run, permitting debugging during mouse-down events and other "volatile" situations.

    • Automatic access to the debugger whenever a program you run from Xcode crashes.

    • Improved compile-time error reporting, interleaving compiler messages with the code they relate to.

    • Automated refactoring, helping you rename classes, methods, and functions, shift methods from class to class, and even create new super classes, in an Objective-C project.

    • Much improved support for source code management tools such as Subversion, CVS, and Perforce.

    • Much improved support for using UNIX scripting languages to create and edit text.

    • The Organizer, a window to hold references to frequently used files and projects.

    • Among the command-line tools, the new xed tool enables you to open text files in Xcode, when a shell script or tool demands an interactive editor.

    • A major upgrade to the documentation system, using RSS feeds for live updates, and permitting developers to add their own documentation to the system.

    • A Research Assistant window that documents API symbols and build variables in real time, as they are selected.

  • A completely revamped Interface Builder, with better tools for crafting nonvisual parts of the human interface, such as controller objects. Integration between IB and Xcode is even tighter than before.

  • A new tool, Instruments, for profiling the resource usage (memory, I/O, graphics, threading) of a program, in real time, on a timeline so that you can see how each element of the performance picture relates to all the others.

Xcode 3 is a ground-up rebuild of the Mac OS X developer tools, and it has been well worth the wait.

Obtaining Xcode

If you have an installation DVD for Mac OS X 10.5 or a new Mac on which Leopard has come installed, you already have Xcode. On the DVD, an installation package can be found in the Xcode Tools folder inside the Optional Installs folder. On new Macs, you'll find a disk image file for Xcode Tools in the Additional Installations folder at the root of your hard drive; double-click the disk image to mount it, and you'll find the installation packages inside.

However, Apple does not always coordinate the latest version of its developer tools with its Mac OS X distributions. Even if you have an installation package on your Mac, or on your distribution disk, it pays to check for a newer version at the Apple Developer Connection (ADC).

Downloading Xcode

You must join ADC to download Xcode. Point your web browser to http://developer.apple.com/, and click the link that offers a membership (at the time of this writing, it was the Sign Up link at the top of the page). You will be offered a handful of options, some expensive. All you need is an Online membership—it's free. Fill out the forms offered to you; they will take contact information and ask you to consent to terms and conditions. There may be marketing questions and offers of mailings.

When you have completed the signup process, go to http://connect.apple.com. Fill in the username and password you chose. You will then be presented with a few options, among these being Downloads. This is what you want; click it.

Depending on your membership level, and how active Apple has been lately in releasing new software, you might not be able to find Xcode on this page. If you don't see it, click Developer Tools in the Downloads column at the right of the page. Scroll down to the first Xcode 3.x download you find (earlier releases may appear lower in the list, and versions of Xcode 2.5 may appear higher). It will be a disk image a bit over 1GB in size. This will comprise the full set of Xcode tools; there is no updater you can apply to a copy you may already have. Click to download.

Installing Xcode

Now that you have the latest Xcode package, it's time to install it. Installation packages can be run straight from a DVD, a mounted disk image file, or your hard disk. There's no difference.

In the Xcode Tools folder, you will find three installation packages:

  • XcodeTools.mpkg, which is the installation package for Xcode and the other tools needed for Mac OS X development.

  • Dashcode.mpkg provides the Dashcode IDE for producing Dashboard widgets. Dashcode is also included in the standard install from XcodeTools.mpkg; this package is for those who are interested only in developing widgets.

  • WebObjects.mpkg installs Apple's excellent WebObjects frameworks and tools, for developing sophisticated database-centered websites in Java. WebObjects is also available as an optional install from within the Xcode Tools Installer.

You will also find a folder named Packages, containing installation packages for components of the Xcode tools, like the CHUD performance-measuring suite, software development kits (SDKs) for X Window and earlier versions of Mac OS X, and version 3.3 of the gcc compiler suite (for PowerPC Macs only). All these are available as options (or within options) in the Xcode Tools Installer, but are here in case you omit them from the original installation and want to add them later.

If you've ever done an installation under Mac OS X, the Xcode tools install is familiar (see Figure I.1). Start by double-clicking the XcodeTools.mpkg installation package. A Welcome screen appears, at which you will press Continue. Next, the installer displays the license for Xcode and its related software; click Continue, and if you accede to the license, click Agree in the ensuing sheet.

Figure I.1 The Welcome panel for the Xcode Tools Installation package should be familiar to any experienced Mac user.

You are now at the Standard Install panel, but we will vary from the standard line. Click the Customize button to reveal the Custom Install panel. This panel (see Figure I.2) contains a table listing the components of the Xcode Tools installation. The single mandatory component is checked and grayed out; the optional components are active, and you can check or uncheck them to include or exclude them from the installation:

  • Developer Tools Essentials. This is Xcode itself, and the graphical and command-line programs that complement it, plus SDKs for developing Mac OS X software for versions 10.4 and later. This is a mandatory component; it doesn't make sense to install the developer tools without installing Xcode and the tools needed for it to run.

  • Figure I.2 The Custom Install panel for the Xcode Tools Installer. The top entry in the package list is for the core Xcode tools, and is not optional. In the Location column is a pop-up menu from which you can select where the developer tools are to go; the default is the Developer folder of your boot disk.

  • Developer Tools System Components. These are the CHUD tools for investigating application performance, plus facilities for distributing application builds over more than one computer. You should install this package.


  • Note - CHUD, gcc 3.3, and WebObjects are not flexible about where they are installed. They will be installed into /Developer no matter what location you choose for the Xcode tools.


  • UNIX Development Support. The "essentials" installation of Xcode installs components such as compilers and their support files in a usr subdirectory of the installation directory. If you will be doing command-line development—for instance, for building open source projects—you will want a set of development tools installed in the root /usr directory tree. This package installs copies of the command-line tools into /usr. You should install this pack...


Customer Reviews

The BEST way to get familiar with the Xcode Environment.5
As another reviewer so kindly mentioned, this book is not for those new to programming, objective-c, or object oriented development. It is Perfect for those of us with a strong background in development that are looking for a walkthrough of the Xcode development environment.

This book makes an excellent followup to Cocoa- Programming for Mac- OS X, Third edition This text moves well beyond cocoa development theory into giving readers a very visual (tons of color screenshots and diagrams) tour of the XCode environment by walking them step-by-step through building a project that implements most of the features that beginning cocoa developers will want to know about when trying to break into the OSX Development world.

One of the biggest plusses about this book has to be the attention given to the Debugger, Unit Testing, Memory Mangement, Instruments and other performance tools. It's information I didn't know how to find before reading this text, and it has given me a greater knowledge about how to better tune my apps and what to pay more attention to while coding.

Overall I would highly recommend picking up Xcode 3 Unleashed to anybody who is seriously considering making an entry into the world of Apple software development. There are too few books on Apple dev, and the fact is that a majority of them are outdated and useless as of Xcode 3 except for theory. This book is a fresh look at Apples latest development environment and I would encourage you to pick it up and get started--it's a great read.

For those of you interested in picking up Xcode skills for iPhone development, this is really a great getting started point for learning the IDE, getting your hands dirty with proper MVC, and learning how to debug and tune your apps. It is definitely worth the read and perhaps a bit more in line with your goals of learning the apple development environment than the Hillegass book. (I wish I had started here first)

And thanks go to Fritz, by the way, for taking the time to create such an in depth tutorial to what is becoming a teriffic development environment from Apple.

Good intro to Xcode, but not Cocoa4
I was given this book by being a member of the Des Moines Cocoaheads group, and as a new developer on the Mac, I was very grateful for it. While other books provide a better introduction to Cocoa and Objective-C, Xcode 3 Unleashed fills a gap by providing detailed explanations of the Xcode IDE itself.

I was able to immediately make use of Chapter 8, Version Control, in my project. That chapter alone is almost worth the cost of the book. It steps you through creating a local repository, adding your project to the repository, committing changes, comparing files, and rolling back changes. After using the built in subversion support in Xcode, relying on Time Machine for version control seems archaic.

Fritz Anderson also spends a good deal of time introducing Xcode to developers more familiar with UNIX and Linux development. Chapter 21 is dedicated to "make Veterans", and explains how Xcode builds a project under the hood. This book also includes separate chapters for using the included debugging and optimization tools like Shark and Instruments.

The last thing I'd like to say about the book is that it is beautifully laid out. Full color illustrations and syntax highlighting that matches the default Xcode editor really make the book stand out. I do not think Xcode 3 Unleashed should be the first book you read getting started in Cocoa development, but it is certainly towards the top of the list. I would recommend learning C first, then Objective-C, and then moving into the IDE. You are much more likely to appreciate all that Xcode does for you after that.

One of the best books I've read on Mac OS X development!5
This is a great book. It is not a pure Cocoa Development book, although it does cover some aspects of Cocoa Development. This goes into all the critical pieces of XCode, i.e. the IDE, Debugger, Source Control, Instrumentation, etc.

Very well illustrated with great layou. I've been a developer for almost 20 years. Have lots of development books. This ranks up there with the best. Makes a perfect companion to Aaron Hillegrass's "Cocoa Programming for Mac OS X" 3RD EDITION. If you're new to Mac OS X Cocoa and iPhone development, the learning curve is steep, but these two books will get you on your way. Have Fun!