Step into Xcode: Mac OS X Development

Step into Xcode: Mac OS X Development

by Fritz Anderson
     
 

ISBN-10: 0321334221

ISBN-13: 9780321334220

Pub. Date: 02/03/2006

Publisher: Addison-Wesley

A Step-by-Step Guide to the Xcode Mac OS Development Environment

Every copy of Mac OS X comes with Xcode, the powerful development suite that Apple uses to build applications ranging from Safari to iTunes. But because Xcode is complex and subtle, even experienced Mac programmers rarely take full advantage of it. Now, Mac developer Fritz Anderson has

…  See more details below

Overview

A Step-by-Step Guide to the Xcode Mac OS Development Environment

Every copy of Mac OS X comes with Xcode, the powerful development suite that Apple uses to build applications ranging from Safari to iTunes. But because Xcode is complex and subtle, even experienced Mac programmers rarely take full advantage of it. Now, Mac developer Fritz Anderson has written the definitive introduction and guide to using Xcode to build applications with any Macintosh technology or language.

Anderson helps you master Xcode's powerful text editor, industry-standard gcc compiler, graphical interactive debugger, mature UI layout and object linkage editor, and exceptional optimization tools. One step at a time, you'll develop a command-line utility, then use Xcode tools to evolve it into a full-fledged Cocoa application. Anderson provides expert guidance on development frameworks, source code management, Core Data modeling, localization, and much more.

Coverage includes

  • Understanding Xcode workflow and the Mac OS X application lifecycle
  • Porting established legacy projects into Xcode
  • Using the Model-View-Controller design pattern to build robust graphical applications
  • Building static libraries and working with Xcode's build system
  • Making the most of bundles and package directories
  • Creating applications compatible with older versions of Mac OS X
  • Creating universal binaries to run on both Intel and PowerPC Macintoshes
  • Adding Spotlight searchability to data files
  • Leveraging Xcode's built-in support for unit testing
  • Using Xcode on makefile-based UNIX development projects

Step Into Xcode's breadth, depth, and practical focus make it indispensable to every Mac developer: current Xcode users upgrading to Xcode 2.1, experienced Mac programmers migrating from CodeWarrior, UNIX/Linux programmers moving to Mac OS X, and even novices writing their first programs or scripts.

Read More

Product Details

ISBN-13:
9780321334220
Publisher:
Addison-Wesley
Publication date:
02/03/2006
Pages:
496
Product dimensions:
7.00(w) x 9.23(h) x 0.93(d)

Table of Contents

Prefacexvii
Part IThe Life Cycle of a Mac OS X Application1
1Kicking the Tires3
1.1First Run3
1.2Hello, World4
1.3What Went Where9
1.4Summary10
2Simple Workflow and Passive Debugging11
2.1Linear Regression11
2.2Plan of Action13
2.3A Command Line Tool14
2.4Build Errors15
2.5Simple Debugging18
2.6Summary21
3Simple Active Debugging23
3.1The Next Step23
3.2Active Debugging24
3.3Summary31
4Compilation: The Basics33
4.1Compiling33
4.2Linking36
4.3Dynamic Loading38
4.4Prebinding39
4.5ZeroLink40
4.6Summary42
5Starting a Cocoa Application43
5.1Plan of Action43
5.1.1Program Tasks43
5.1.2Model-View-Controller43
5.2Starting a New Project48
5.3Implementation: Model50
5.3.1DataPoint50
5.3.2Regression Model Class54
5.3.3Model: Done58
5.4Summary60
6A Cocoa Application: Views61
6.1Interface Builder62
6.2Layout63
6.3Sizing67
6.4A Split View71
6.5Summary71
7A Cocoa Application: Controllers73
7.1Still in Interface Builder73
7.2NSObjectController: Document75
7.3NSObjectController: Model77
7.4NSArrayController: DataPoints78
7.5Value Binding80
7.6Actions and Outlets81
7.7MyDocument82
7.8Application Properties84
7.9Building87
7.10Summary87
8Property Lists89
8.1Data Types89
8.2Property List Files90
8.2.1Writing a Property List90
8.2.2Examining Property Lists100
8.3Other Formats100
8.3.1ASCII Property Lists106
8.3.2Binary Property Lists107
8.4Text Macros107
8.5Summary113
9Libraries and Dependent Targets115
9.1Adding a Target115
9.2Library Design116
9.3Modifying Linear121
9.4A Dependent Target123
9.5Examining the Library125
9.6Running the Library127
9.7Summary128
10File Packages and Bundles129
10.1A Simple Package: RTFD130
10.2Bundles132
10.3Application Bundles132
10.4The Info.plist File134
10.4.1Keys for All Bundles135
10.4.2Keys for Applications136
10.4.3Keys for Plug-Ins138
10.4.4Keys for Java139
10.4.5Keys for Preference Panes139
10.4.6Keys for Dashboard Widgets139
10.5Summary140
11Creating a Custom View141
11.1Controller141
11.2View143
11.3The Delegate Design Pattern146
11.4The Custom View149
11.5Showing the Window156
11.6Testing157
11.7Debugging a View159
11.8Summary163
12Dynamic Libraries and Frameworks165
12.1Adding a Framework Target166
12.2Framework Structure171
12.3Using the Framework173
12.4Where Frameworks Go175
12.5Private Frameworks179
12.6Prebinding181
12.7Summary182
13Version Control183
13.1Setting up a Repository185
13.2Controlling Linear191
13.3Long Live Linear194
13.4Tagging195
13.5Summary198
14Cross-Development199
14.1Cross-Development SDKs199
14.2Nib Compatibility203
14.3NSTableDataSource205
14.4Add, Remove, Compute, and Graph Buttons208
14.5Run and Archive211
14.6A More Sophisticated Approach212
14.7Producing a Universal Binary212
14.7.1Auditing for Portability213
14.7.2Auditing Linear214
14.7.3Building Universal217
14.7.4Mixing SDKs218
14.8Summary219
15Using the Data Modeling Tools221
15.1Data Modeling221
15.2Revisiting the Model224
15.2.1DataPoint225
15.2.2Regression228
15.2.3MyDocument232
15.3Interface Builder234
15.4Build and Run235
15.5Adding an Entity237
15.5.1Adding to the Data Model237
15.5.2Human Interface238
15.5.3First Run240
15.5.4One More Table241
15.6Summary242
16Spotlight243
16.1How Data Gets into Spotlight243
16.2Uniform Type Identifiers246
16.3The Metadata Plug-In249
16.3.1MetaLinear Project Files249
16.3.2Packaging the Plug-In254
16.4Core Data and Metadata254
16.5The Proof of the Pudding258
16.6Summary261
17Finishing Touches263
17.1Trimming the Menus263
17.2Avoiding Singularity264
17.3Localization266
17.3.1Credits.rtf266
17.3.2MainMenu.nib267
17.3.3MyDocument.nib267
17.3.4GraphWindow.nib269
17.3.5InfoPlist.strings270
17.3.6Trying It Out271
17.3.7Localizable.strings272
17.4Checking Memory Usage274
17.5The Release Build Configuration276
17.6Dead-Code Stripping278
17.7Xcodebuild279
17.8Summary281
Part IIXcode Tasks283
18Navigating an Xcode Project285
18.1Editor Panes285
18.1.1Jumps285
18.1.2Code Sense286
18.1.3Navigation Bar287
18.1.4Editor Modes289
18.2Project Find Window290
18.3The Favorites Bar291
18.4Groups & Files List292
18.4.1The Project Group292
18.4.2The Targets Group294
18.4.3The Executables Group296
18.4.4Smart Groups297
18.4.5Symbol Smart Group298
18.5Class Browser Window299
18.6Class Modeler299
18.7Project Layout302
18.7.1Default Layout302
18.7.2All-in-One Layout303
18.7.3Condensed Layout305
18.8Summary306
19Xcode for CodeWarrior Veterans307
19.1Losses307
19.1.1Speed307
19.1.2Syntax Coloring308
19.1.3Debugging Templates308
19.1.4RAD Tools309
19.2Make Yourself at Home309
19.2.1The Project Window309
19.2.2Key Mapping311
19.2.3Build Behavior312
19.2.4Window Behavior313
19.3Converting a CodeWarrior Project314
19.3.1Importing the Project315
19.3.2Targets and Configurations315
19.4Traps in Conversion319
19.5Exporting Symbols320
19.5.1#pragma export320
19.5.2Another Way322
19.6Summary323
20Xcode for make Veterans325
20.1Xcode Build Variables327
20.2Custom Build Rules328
20.3Run Script Build Phase330
20.4Under the Hood: A Simple Build331
20.4.1Copy Structural Files332
20.4.2Copy Bundle Resources333
20.4.3Compile Sources333
20.4.4Linkage (First Architecture)336
20.4.5Compile Sources (Second Architecture)336
20.4.6Linkage (Second Architecture)337
20.4.7Create Universal Binary337
20.4.8Compile Data Models338
20.4.9Finishing Touch339
20.5The xcodebuild Tool339
20.6Settings Hierarchy340
20.7Build Configurations342
20.8Summary344
21More About Debugging345
21.1Debugging Techniques345
21.2Printing Values348
21.3Custom Formatters349
21.4Breakpoint Commands352
21.5Breakpoint Conditions354
21.6Lazy Symbol Loading355
21.7Zombies356
21.7.1Released-Pointer Aliasing357
21.7.2Zombies in Cocoa359
21.7.3Zombies in Core Foundation360
21.8Summary361
22Xcode and Speed363
22.1Precompiled Headers363
22.2Predictive Compilation364
22.3Distributed Builds365
22.4ZeroLink366
22.5Project Indexing367
22.6Summary368
23AppleScript Studio369
23.1An AppleScript Application369
23.2Unit Testing377
23.2.1Adding OCUnit378
23.2.2Test Cases379
23.2.3Testing Options383
23.3Summary383
24A Large Project385
24.1Graphviz386
24.2Preparing the Project386
24.3An External Build Project389
24.4Debugging a Custom Executable393
24.5Performance396
24.6A Better Way to Include Files400
24.6.1The Script401
24.6.2Building the Project Index404
24.6.3Compromising with AppleScript405
24.7Summary405
25Closing Snippets407
25.1Miscellaneous Traps407
25.2Miscellaneous Tips409
25.3Documentation413
25.3.1The Documentation Window414
25.3.2Documentation Updates416
Appendix AInstalling Xcode417
A.1Apple Developer Connection419
A.1.1Downloading from ADC420
A.2Setting up the Dock420
Appendix BSome Build Variables423
B.1Useful Build Variables423
B.2Splitting Build Variables429
B.3Source Trees430
Glossary433
Index441

Read More

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >