Cover image for Beginning Xcode
Title:
Beginning Xcode
Publication Information:
Indianapolis, IN : Wrox/Wiley Pub., c2006.
ISBN:
9780471754794
Physical Description:
xxviii, 590 p. : ill. ; 24 cm.
System Details:
Mode of access: Internet via World Wide Web.
Series:
Wrox beginning guides
Language:
English
General Note:
"Programmer to programmer"--Cover.

Includes index.
Title Subject:
Holds:

Available:*

Library
Material Type
Shelf Number
Copies
Status
Searching...
Book QA76.76.O63B826 2006 1
Searching...

On Order

Summary

Summary

Xcode is a powerful suite of free development tools from Apple Computer that will allow you to create Macintosh applications, plug-ins, web components, applets, and more using languages such as C, C++, Objective-C, Java, and AppleScript.

What you will learn from this book:

Control window layout to match your development style. Master source file organization. How to access a source control management system, right in the Xcode interface. How to quickly navigate to files, symbols, bookmarks, declarations, and definitions within your project; find reference documents and instantly access API documentation. Harness Xcode's smart editing features, such as auto-indent, code completion, and text macros. Discover how easy it is to browse class information and create dynamic class diagrams. Get started using Xcode's Interface Builder and Data Modeling design tools. Learn to customize target build phases, add your own compilers, write your own build processes, and integrate Xcode with other build tools like Ant and gnumake. How to create and integrate unit tests into your projects. Harness the full power of the debugger with smart breakpoints and custom data formatters. Learn how to change variables, and even fix bugs, while your program is still running. Start using Xcode's suite of performance analysis tools to find problems and accelerate your code. Customize scores of hidden, and often undocumented, Xcode features. Learn how to remap keyboard commands, create your own project and file templates, and even add your own commands to the Xcode menus.

Instead of "cookbook" projects specific to a particular language, developer James Bucanek details each Xcode feature with step-by-step instructions that can be applied directly to your projects. Example projects that demonstrate a single concept make it easy to explore each feature.


Table of Contents

Acknowledgmentsp. ix
Introductionp. xiii
Chapter 1 Installing Xcodep. 1
The Xcode Installerp. 1
Running the Installerp. 2
Upgrading Xcodep. 7
Removing and Reinstalling Xcodep. 8
Summaryp. 8
Chapter 2 The Grand Tourp. 9
The Projectp. 9
Source Groupp. 11
Smart Groupsp. 11
Menusp. 12
Editorp. 12
Data Miningp. 13
Getting Helpp. 14
Buildingp. 16
Getting It Rightp. 17
Collaborationp. 17
Summaryp. 17
Chapter 3 Xcode Layoutp. 19
Project Layoutp. 20
Choosing a Layoutp. 20
Changing the Layoutp. 22
Groups & Filesp. 24
Project Structure Groupp. 25
Smart Groupsp. 25
Altering Source Groups and Their Contentsp. 26
Showing and Hiding Groupsp. 27
Reusing Your Layoutp. 28
Creating Simple Smart Groupsp. 29
Deleting Simple Smart Groupsp. 30
Details, Detailsp. 31
Showing and Hiding Detailsp. 32
Showing and Hiding Details in the Groups & Files Listp. 32
Info Windowsp. 33
Toolbarsp. 34
Status Bar and Favorites Barp. 35
Activity Viewer Windowp. 35
Summaryp. 35
Exercisep. 36
Chapter 4 The Projectp. 37
Creating a New Projectp. 37
Choosing a Templatep. 38
Naming the New Projectp. 39
What's in a Name?p. 40
Who's_MyCompanyName_?p. 42
Closing a Projectp. 45
Opening One or More Projectsp. 45
Renaming and Relocating Projectsp. 48
Upgrading Projectsp. 48
Old Project Templatesp. 49
Importing ProjectBuilderWO (WebObjects) Projectsp. 50
Migrating from CodeWarrior to Xcodep. 51
Migrating from Anything Else to Xcodep. 52
Project Attributesp. 52
Summaryp. 54
Exercisep. 55
Chapter 5 Sourcesp. 57
Referencesp. 57
Organizing Sourcesp. 59
Default Referencesp. 60
Sharing a Subfolderp. 61
Everything Is Relativep. 63
Outside the Boxp. 64
Bad Referencesp. 66
Source Item Typesp. 67
Creating New Source Filesp. 69
Adding Existing Sourcesp. 73
Selecting the Items to Addp. 73
Adding an Open Filep. 77
Source Attributesp. 77
Changing Attributes for Multiple Itemsp. 79
Ridding Targets of Unwanted Filesp. 80
Reorganizing Sourcesp. 80
Summaryp. 86
Exercisep. 86
Chapter 6 Editing Textp. 87
Windows and Panesp. 87
Editing Panesp. 87
Closing and Saving Editor Panesp. 91
The Editor Panep. 92
Scroll Barsp. 93
Split-Pane Editingp. 94
Gutterp. 96
Navigation Barp. 96
Status and Toolbarsp. 97
Display Optionsp. 98
Navigation Within a Filep. 101
Cursor Movementp. 101
Emacsp. 102
Scrollingp. 103
Jumpingp. 103
Navigation Between Filesp. 106
Editingp. 109
Selecting Textp. 109
Deleting Textp. 111
Drag and Dropp. 111
Font and Text Stylesp. 112
Saving Filesp. 112
Undop. 113
Syntax-Aware Editingp. 115
Syntax Coloringp. 115
Changing Syntax Coloring for a Single Filep. 118
Indenting Textp. 118
Re-indenting Textp. 122
Tab Settings for a Single Filep. 122
Code Sensep. 122
Involing Code-Completionp. 123
Rebuilding the Code Sense Indexp. 129
Text Macrosp. 130
Shell Scriptsp. 132
Spell Checkingp. 132
Interactive Checkingp. 132
Finding One Wordp. 133
Checking While Typingp. 134
File Encodingp. 134
Localizing Filesp. 136
Printingp. 139
Servicesp. 139
Using an External Editorp. 140
Summaryp. 142
Chapter 7 Searchingp. 143
Searching a Text Filep. 143
Searching for a Text Patternp. 144
Searching for a Regular Expressionp. 146
Replacing Textp. 153
Replacing Text Using Regular Expressionsp. 153
Search Historyp. 155
Searching Multiple Filesp. 155
Find Results Smart Groupp. 156
Project Search Historyp. 157
Replacing Text in Multiple Filesp. 157
Batch File Optionsp. 158
Search Shortcutsp. 160
Searching Listsp. 162
Summaryp. 163
Exercisep. 164
Chapter 8 Class Browserp. 165
Navigating the Class Browserp. 165
Class Browser Option Setsp. 168
Browser Shortcutsp. 170
Summaryp. 170
Chapter 9 Help and Documentationp. 171
Help and Documentation Windowp. 171
Browsing the Apple Developer Connection Reference Libraryp. 171
Navigating Help Documentsp. 174
Bookmarksp. 175
External Linksp. 175
Extended Documentationp. 176
Controlling Text Sizep. 178
Searching Documentationp. 178
Full-Text Searchp. 178
Search Expressionsp. 179
API Searchp. 180
Man Pagesp. 181
AppleScript Dictionariesp. 182
Staying Up-To-Datep. 183
Documentation Shortcutsp. 184
Adding Custom Documentationp. 185
The Xcode Communityp. 186
Summaryp. 187
Chapter 10 Interface Builderp. 189
NIB Filesp. 189
Serializationp. 191
Cocoa versus Carbonp. 191
Xcode Integrationp. 192
Interface Builder's Interfacep. 192
Multiple NIB Document Windowsp. 194
Building Interfacesp. 195
Saving NIB Filesp. 198
Making Backupsp. 199
Creating Objectsp. 199
Creating Menusp. 199
Creating Windowsp. 200
Creating Other Objectsp. 201
Selecting Objectsp. 201
Deleting Objectsp. 203
Testing an Interfacep. 203
Editing Objectsp. 203
Moving and Resizing Objectsp. 203
Subviewsp. 206
Guidesp. 207
Inspector Palettep. 208
Tab Orderp. 217
Custom Classesp. 218
Creating Classes in Interface Builderp. 220
Importing and Exporting Classesp. 222
NIB File Formatsp. 225
Compatibility Checkingp. 226
Customizing Interface Builderp. 227
Summaryp. 229
Exercisep. 229
Chapter 11 Class Modelingp. 231
Creating a Class Modelp. 234
Class Model Browserp. 235
Class Model Diagramp. 236
Nodesp. 236
Toolsp. 238
Navigationp. 239
Editing a Class Modelp. 241
Moving Nodesp. 241
Page Layoutp. 243
Changing the Trackingp. 243
Adding Annotationsp. 244
Customizing Colors and Fontsp. 245
Hiding Classes and Membersp. 246
Summaryp. 251
Chapter 12 Data Modelingp. 253
Technologyp. 253
Terminologyp. 254
Creating a Data Modelp. 255
Creating Entitiesp. 256
Creating Propertiesp. 257
Adding Fetched Propertiesp. 260
Adding Fetch Requestsp. 260
Data Modeling Interfacep. 261
Data Model Browserp. 261
Detail Pane Viewsp. 261
Data Model Diagramp. 262
Toolsp. 263
Duplicating Entities and Propertiesp. 264
Predicate Builderp. 264
Creating an Instant Interfacep. 268
Creating NSManagedObject Subclassesp. 270
Exporting Class Methodsp. 271
Summaryp. 272
Chapter 13 Targetsp. 273
Target Componentsp. 273
Target Typesp. 276
Native Targetsp. 277
Jam-Based Targetsp. 277
External Targetsp. 278
Aggregate Targetsp. 279
Creating a Targetp. 279
Target Template Groupsp. 281
Duplicating Targetsp. 284
Deleting Targetsp. 284
Build Phasesp. 284
Files in a Build Phasep. 285
Build Phase Typesp. 287
Build Rulesp. 291
Target Dependenciesp. 296
Adding Target and Project Dependenciesp. 296
Strategies for Target Dependenciesp. 298
Build Settingsp. 299
Jam-Based Target Editorp. 300
Propertiesp. 301
Productsp. 303
Executablesp. 303
Summaryp. 303
Exercisep. 304
Chapter 14 Building Projectsp. 305
Starting and Stopping a Buildp. 305
Clean Buildsp. 306
Controlling the Build of Individual Itemsp. 308
Selecting the Active Target and Build Configurationp. 309
Building an Inactive Targetp. 309
Partial Buildsp. 309
The Build Windowp. 310
Navigating Errors and Warningsp. 311
Opening and Closing the Build Window Automaticallyp. 313
Common Build Preferencesp. 314
Build Locationsp. 315
Build Location Strategiesp. 318
Build Settingsp. 319
The Scope of Build Settingsp. 321
Build Setting Evaluationp. 322
Build Configurationsp. 325
Editing Build Settingsp. 327
Creating and Deleting a Build Settingp. 330
Build Setting Valuesp. 330
Switching Between Build Configurationsp. 331
Editing Build Configurationsp. 332
Configuration Filesp. 333
Adding a Configuration Filep. 335
Using Configuration Filesp. 335
Moving Build Settings Aroundp. 335
Environment Settingsp. 336
Customizing the Buildp. 337
Per-File Compiler Flagsp. 337
Cross-Developmentp. 338
Building Universal Binariesp. 341
Disallowing ZeroLinkp. 342
Build Settings in Detailp. 342
The xcodebuild Toolp. 351
Using the xcodebuild Toolp. 352
Compatibilityp. 353
Distributed Buildsp. 353
Summaryp. 356
Exercisep. 356
Chapter 15 Debuggingp. 359
Running an Applicationp. 359
Choosing the Active Executablep. 360
Built to be Debuggedp. 361
Debugging Executablesp. 364
Attaching to Running Executablesp. 365
The Debugger Windowp. 365
The Threads Panep. 366
The Listing or Editor Panep. 367
The Variables Panep. 368
Controlling the Debuggerp. 370
Debug Visualizerp. 375
Breakpointsp. 375
Breakpoint Typesp. 377
Breakpoints Windowp. 377
Deleting Breakpointsp. 378
Grouping Breakpointsp. 378
Enabling and Disabling Breakpointsp. 379
Creating Symbolic Breakpointsp. 380
Iffy Breakpointsp. 381
Breakpoint Actionsp. 384
Breakpoint Continuationp. 387
Importing and Exporting Breakpointsp. 388
Breakpoint Templatesp. 388
Examining Datap. 389
Viewing Global Variablesp. 391
Expressionsp. 392
Data Formattersp. 393
Beyond Data Formatter Stringsp. 398
Object Descriptionsp. 399
Watchpointsp. 399
Changing Data and Codep. 399
The Magic Fixp. 400
Magic Fix Limiationsp. 402
Debugger Consolep. 402
Shared Librariesp. 403
Custom Executablesp. 404
General Settingsp. 405
Arguments and Environmentp. 406
Debuggingp. 407
Selecting an Executablep. 408
Debugger Preferencesp. 409
Remote Debuggingp. 410
Debugging Aidesp. 413
Catching a Catchp. 413
Stopping for Debugger() and DebugStr()p. 414
Guard Mallocp. 414
Debug Variablesp. 415
Summaryp. 418
Chapter 16 Performance Analysisp. 419
Performance Basicsp. 419
Preparing for Analysisp. 421
Sharkp. 421
Profile Viewp. 423
Statistical Samplingp. 425
Code Viewp. 428
Stack Viewp. 431
Refining the Analysisp. 432
Saving and Comparing Shark Sessionsp. 433
Merging Shark Sessionsp. 434
Tip of the Icebergp. 434
Samplerp. 434
MallocDebugp. 435
Pruningp. 437
ObjectAllocp. 439
Global Allocationsp. 440
History Graphp. 441
Instance Browserp. 441
Call Stackp. 442
Other Performance and Analysis Toolsp. 443
Summaryp. 444
Exercisep. 444
Chapter 17 Unit Testingp. 445
How Unit Tests Workp. 446
Preparing for Unit Testsp. 446
Independent Unit Testsp. 447
Dependent Unit Testsp. 447
Target Dependenciesp. 448
Adding a Unit Test Targetp. 448
Configuring an Independent Unit Testp. 449
Configuring a Dependent Unit Testp. 450
Creating a Unit Testp. 453
Inter-test Initializationp. 454
Objective-C Testsp. 455
Objective-C Test Macrosp. 457
C++ Testsp. 458
Debugging Unit Testsp. 464
Debugging Dependent Unit Testsp. 464
Debugging Independent Unit Testsp. 465
Summaryp. 466
Exercisep. 466
Chapter 18 Sharing Sourcep. 467
Source Treesp. 468
Define a Source Treep. 469
Source Tree Referencesp. 469
Source Controlp. 471
Installing the Subversion Clientp. 472
Creating a Repositoryp. 473
Adding a Project to Source Controlp. 473
Configuring a Project for Source Controlp. 474
Source Control Interfacep. 476
SCM Smart Groupp. 477
Committing Changesp. 480
Saving Before Committingp. 481
Discarding Changesp. 481
Adding Files to Source Controlp. 482
Deleting Files under Source Controlp. 482
Renaming Files under Source Controlp. 483
Updating Filesp. 483
Comparing Revisionsp. 484
Customizing Comparep. 486
Merging Changesp. 486
Viewing Annotationsp. 487
Resolving Conflictsp. 488
Going Offlinep. 489
SCM and the Project Documentp. 489
Summaryp. 490
Chapter 19 Customizing Xcodep. 491
Xcode Preferencesp. 492
Key Bindingsp. 492
Menu Key Bindingsp. 493
Text Key Bindingsp. 496
Expert Preferencesp. 499
Projects and Filesp. 500
Editingp. 501
Functions Menup. 502
Buildingp. 503
Distributed Buildsp. 505
Debuggingp. 505
Source Code Managementp. 506
Documentationp. 507
Templatesp. 508
File Templatesp. 508
Template Macrosp. 509
Project Templatesp. 512
Target Templatesp. 516
Custom Scriptsp. 517
The StartupScriptp. 518
The Default StartupScriptp. 519
Anatomy of a Custom Scriptp. 520
Menu Script Definitionsp. 520
Custom Script Variablesp. 524
Script Helpersp. 526
AppleScriptp. 528
Summaryp. 530
Exercisep. 530
Appendix A Exercise Answersp. 531
Appendix B Project Templatesp. 543
Indexp. 559