You are previewing Professional Xcode® 3.
O'Reilly logo
Professional Xcode® 3

Book Description

A solid guide that responds to the active interest in Apple's Xcode tools

Apple's Xcode tools are a collection of applications and frameworks that are used to develop, test, and optimize applications primarily written for Mac OS X or the iPhone. The steady increase in sales of Apple computers has triggered a strong interest in gaining a thorough understanding of Xcode and its tools and what they have to offer. This book provides you with an inside look at the array of Xcode tools from top to bottom.

You'll go beyond the basics and dive into such in-depth topics as installing the latest version of Xcode tools, customizing the look and behavior of Xcode, creating and managing projects, using the built-in class browser to model complex applications and structures, and more.

  • Offers you a solid foundation for getting the most out of Apple's Xcode tools, a collection of applications and frameworks used to develop, test, and optimize applications written for Mac OS X or the iPhone

  • Includes clear, comprehensive lessons for installing the latest version of Xcode tools, customizing the look of Xcode, creating and managing projects, testing your interfaces, and building and debugging your projects

  • Explains analyzing performance, optimizing your application, working with shared sources, creating your own custom file templates, and customizing the interface builder

With this book, you'll be able to take full advantage of the range of tools included with Xcode.

Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file.

Table of Contents

  1. Copyright
  2. ABOUT THE AUTHOR
  3. CREDITS
  4. ACKNOWLEDGMENTS
  5. INTRODUCTION
    1. WHO THIS BOOK IS FOR
    2. WHAT THIS BOOK COVERS
    3. HOW THIS BOOK IS STRUCTURED
    4. WHAT YOU NEED TO USE THIS BOOK
    5. CONVENTIONS
    6. SOURCE CODE
    7. ERRATA
    8. P2P.WROX.COM
  6. 1. Installing Xcode
    1. 1.1. THE XCODE INSTALLER
    2. 1.2. RUNNING THE INSTALLER
    3. 1.3. UPGRADING XCODE
    4. 1.4. REMOVING AND REINSTALLING XCODE
    5. 1.5. SUMMARY
  7. 2. The Grand Tour
    1. 2.1. THE PROJECT
      1. 2.1.1. Source Groups
      2. 2.1.2. Smart Groups
    2. 2.2. MENUS
    3. 2.3. EDITORS
    4. 2.4. SEARCHING, SYMBOLS, AND REFACTORING
    5. 2.5. GETTING HELP
    6. 2.6. BUILDING
    7. 2.7. GETTING IT RIGHT
    8. 2.8. COLLABORATION AND VERSION CONTROL
    9. 2.9. SUMMARY
  8. 3. Xcode Layout
    1. 3.1. PROJECT LAYOUT
      1. 3.1.1. Choosing a Layout
      2. 3.1.2. Changing the Layout
    2. 3.2. GROUPS & FILES
      1. 3.2.1. Project Structure Group
      2. 3.2.2. Smart Groups
      3. 3.2.3. Organizing Groups and Their Contents
      4. 3.2.4. Showing and Hiding Groups
      5. 3.2.5. Making Your Layout the Default Layout
      6. 3.2.6. Customizing the Implementation and InterfaceBuilder Files Smart Groups
      7. 3.2.7. Custom Smart Groups
        1. 3.2.7.1. Creating a Simple Smart Group
        2. 3.2.7.2. Defining a Smart Group
        3. 3.2.7.3. Using Custom Smart Groups in Other Projects
        4. 3.2.7.4. Deleting Custom Smart Groups
    3. 3.3. DETAILS, DETAILS
      1. 3.3.1. Showing and Hiding Detail Columns
      2. 3.3.2. Showing Details in the Groups & Files List
    4. 3.4. INFO WINDOWS
    5. 3.5. TOOLBARS
    6. 3.6. STATUS BAR AND FAVORITES BAR
    7. 3.7. ACTIVITY VIEWER WINDOW
    8. 3.8. SUMMARY
  9. 4. The Project
    1. 4.1. CREATING A NEW PROJECT
      1. 4.1.1. Choosing a Template
      2. 4.1.2. Naming the New Project
      3. 4.1.3. What's in a Name?
      4. 4.1.4. Who's _MyCompanyName_?
        1. 4.1.4.1. Closing a Project
      5. 4.1.5. Opening One or More Projects
      6. 4.1.6. Renaming and Relocating Projects
      7. 4.1.7. Upgrading Projects
    2. 4.2. PROJECT SETTINGS
    3. 4.3. SUMMARY
  10. 5. Sources
    1. 5.1. REFERENCES
    2. 5.2. SOURCE ITEM TYPES
    3. 5.3. SOURCE ITEM ATTRIBUTES
      1. 5.3.1. Setting an Item's Path
      2. 5.3.2. Source Item Type and Encoding
      3. 5.3.3. Changing Attributes for Multiple Items
    4. 5.4. ORGANIZING SOURCES
      1. 5.4.1. Default References
      2. 5.4.2. Sharing a Subfolder
      3. 5.4.3. Everything is Relative
      4. 5.4.4. Outside the Box
      5. 5.4.5. Bad References
      6. 5.4.6. Best Practices
    5. 5.5. CREATING NEW SOURCE FILES
    6. 5.6. CREATING AN EMPTY FILE
    7. 5.7. ADDING EXISTING ITEMS
      1. 5.7.1. Selecting the Items to Add
        1. 5.7.1.1. Copying Items into the Destination Group's Folder
        2. 5.7.1.2. Reference Type
        3. 5.7.1.3. Text Encoding
        4. 5.7.1.4. Recursively Creating Groups and Creating Folder References
        5. 5.7.1.5. Adding the New Items to Targets
      2. 5.7.2. Adding a Framework
      3. 5.7.3. Adding an Open File
      4. 5.7.4. Ridding Targets of Unwanted Files
    8. 5.8. REMOVING SOURCE ITEMS
    9. 5.9. REORGANIZING SOURCES
      1. 5.9.1. Moving Files
      2. 5.9.2. Rearranging Folders
      3. 5.9.3. Reorganizing by Re-adding
    10. 5.10. SUMMARY
  11. 6. Editing Text
    1. 6.1. WINDOWS AND PANES
      1. 6.1.1. Editing Panes
        1. 6.1.1.1. Opening a File in a Separate Window
        2. 6.1.1.2. Editor Panes in Multi-Pane Windows
        3. 6.1.1.3. The Project Window's Editor Pane
        4. 6.1.1.4. Using a Group Editor Window
        5. 6.1.1.5. Opening Files from the Filesystem
        6. 6.1.1.6. Open Quickly by Filename or Symbol
      2. 6.1.2. Closing and Saving Editor Panes
    2. 6.2. THE EDITOR PANE
      1. 6.2.1. Scrollbars
      2. 6.2.2. Split-Pane Editing
      3. 6.2.3. Gutter
      4. 6.2.4. Navigation Bar
    3. 6.3. DISPLAY OPTIONS
      1. 6.3.1. Text Wrapping
      2. 6.3.2. Invisible Characters
      3. 6.3.3. Global Display Options
        1. 6.3.3.1. Editor Pane Display Options
        2. 6.3.3.2. Editing Options
        3. 6.3.3.3. Save Options
        4. 6.3.3.4. File Encoding
    4. 6.4. NAVIGATION WITHIN A FILE
      1. 6.4.1. Cursor Movement
      2. 6.4.2. Emacs
      3. 6.4.3. Scrolling
      4. 6.4.4. Jumping to Functions, Breakpoints, and Bookmarks
        1. 6.4.4.1. Functions
        2. 6.4.4.2. Bookmarks
        3. 6.4.4.3. Breakpoints
      5. 6.4.5. Jumping to Other Files
        1. 6.4.5.1. File History
        2. 6.4.5.2. Aggregate History
        3. 6.4.5.3. Adding an Arbitrary File to the History
        4. 6.4.5.4. Included Files
        5. 6.4.5.5. Switching Between a Header and its Source File
        6. 6.4.5.6. Jumping to a Definition
    5. 6.5. EDITING
      1. 6.5.1. Selecting Text
        1. 6.5.1.1. Selecting Columns
        2. 6.5.1.2. Selecting Code Blocks
        3. 6.5.1.3. Jumping to a Line or Character
      2. 6.5.2. Deleting Text
      3. 6.5.3. Drag and Drop
      4. 6.5.4. Font and Text Styles
      5. 6.5.5. Saving Files
      6. 6.5.6. Undo
    6. 6.6. SHELL SCRIPTS
    7. 6.7. SPELL CHECKING
      1. 6.7.1. Interactive Checking
      2. 6.7.2. Checking One Word
      3. 6.7.3. Checking While Typing
    8. 6.8. FILE ENCODING
    9. 6.9. LOCALIZING FILES
      1. 6.9.1. Creating Localized Versions of a File
      2. 6.9.2. Removing Some or All Localizations
    10. 6.10. PRINTING
    11. 6.11. SERVICES
    12. 6.12. SUMMARY
  12. 7. Syntax-Aware Editing
    1. 7.1. CODE SENSE
      1. 7.1.1. Enabling Code Sense
      2. 7.1.2. Reindexing a Project
    2. 7.2. SYNTAX COLORING
      1. 7.2.1. Customizing Syntax Coloring
      2. 7.2.2. Changing Syntax Coloring for a Single File
    3. 7.3. CODE FOLDING
      1. 7.3.1. Code Focus
      2. 7.3.2. Folding Code
      3. 7.3.3. Unfolding Code
    4. 7.4. INDENTING TEXT
      1. 7.4.1. Setting Tab Width and Indent Width
      2. 7.4.2. Automatic Indentation
      3. 7.4.3. Syntax-Aware Indentation
        1. 7.4.3.1. Syntax-Aware Tab Indenting
        2. 7.4.3.2. Indenting Solitary "{"
        3. 7.4.3.3. Automatically Close { ... } Blocks
        4. 7.4.3.4. Controlling When Automatic Indentation Occurs
        5. 7.4.3.5. Indenting Comments
      4. 7.4.4. Re-indenting Text
    5. 7.5. CODE COMPLETION
      1. 7.5.1. Accepting Suggestions
        1. 7.5.1.1. Suggestion Display Settings
        2. 7.5.1.2. Getting Another Suggestion
      2. 7.5.2. Using Completion Lists
      3. 7.5.3. Completion Arguments
    6. 7.6. TEXT MACROS
    7. 7.7. EDITING SYMBOL NAMES
    8. 7.8. SUMMARY
  13. 8. Searching
    1. 8.1. SEARCHING AND REPLACING TEXT IN A SINGLE FILE
      1. 8.1.1. Setting Search Options
      2. 8.1.2. Replacing Text
    2. 8.2. SEARCHING AND REPLACING TEXT IN MULTIPLE FILES
      1. 8.2.1. Finding a Pattern in Multiple Files
      2. 8.2.2. Replacing Text in Multiple Files
      3. 8.2.3. Batch Find Options
    3. 8.3. SEARCH PATTERNS
      1. 8.3.1. Textual or String Search
      2. 8.3.2. Regular Expression Search
        1. 8.3.2.1. Regular Expressions
          1. 8.3.2.1.1. Patterns
          2. 8.3.2.1.2. Operators
          3. 8.3.2.1.3. Try Some Regular Expressions
        2. 8.3.2.2. Learning More about Regular Expressions
        3. 8.3.2.3. Replacing Text Using Regular Expressions
      3. 8.3.3. Symbol Search
        1. 8.3.3.1. Definitions Search
        2. 8.3.3.2. Symbol Search
    4. 8.4. SEARCH HISTORY
      1. 8.4.1. Recent Search Patterns and Replacement Text
      2. 8.4.2. Recent Search Results
      3. 8.4.3. Global Search Patterns
    5. 8.5. FIND RESULTS SMART GROUP
    6. 8.6. SEARCH SHORTCUTS
    7. 8.7. SEARCHING LISTS
    8. 8.8. SUMMARY
  14. 9. Class Browser
    1. 9.1. NAVIGATING THE CLASS BROWSER
      1. 9.1.1. Browsing Classes
      2. 9.1.2. Getting Class Documentation
      3. 9.1.3. Opening Multiple Class Browsers
    2. 9.2. CLASS BROWSER OPTION SETS
    3. 9.3. BROWSER SHORTCUTS
    4. 9.4. SUMMARY
  15. 10. Refactoring
    1. 10.1. REFACTORING WORKFLOW
    2. 10.2. C AND OBJECTIVE-C TRANSFORMATIONS
      1. 10.2.1. Rename
      2. 10.2.2. Extract
      3. 10.2.3. Encapsulate
      4. 10.2.4. Create Superclass
      5. 10.2.5. Move Up and Move Down
      6. 10.2.6. Modernize Loop
    3. 10.3. UPDATING A PROJECT TO OBJECTIVE-C 2.0
    4. 10.4. REFACTORING PITFALLS
      1. 10.4.1. Rename
      2. 10.4.2. Encapsulate
      3. 10.4.3. Move Up
      4. 10.4.4. Move Down
      5. 10.4.5. Modernize Loop
      6. 10.4.6. Use Properties
    5. 10.5. SUMMARY
  16. 11. Snapshots
    1. 11.1. TAKING SNAPSHOTS
    2. 11.2. MANAGING SNAPSHOTS
      1. 11.2.1. Commenting on Snapshots
      2. 11.2.2. Examining Snapshots
      3. 11.2.3. Restoring Changes
        1. 11.2.3.1. Restore Individual Changes
        2. 11.2.3.2. Restore Individual Files
        3. 11.2.3.3. Restore an Entire Project
        4. 11.2.3.4. Undoing a Restore
    3. 11.3. DELETING SNAPSHOTS
    4. 11.4. SUMMARY
  17. 12. Help and Documentation
    1. 12.1. THE DOCUMENTATION WINDOW
      1. 12.1.1. Browsing Documentation
      2. 12.1.2. Navigating Help Documents
      3. 12.1.3. Bookmarks
      4. 12.1.4. External Links
    2. 12.2. SAMPLE PROJECTS
    3. 12.3. SEARCHING DOCUMENTATION
      1. 12.3.1. Search Field
      2. 12.3.2. Search Control Bar
        1. 12.3.2.1. Word Boundary
        2. 12.3.2.2. Documentation Sets
        3. 12.3.2.3. Language Sets
      3. 12.3.3. Text Search
      4. 12.3.4. Command and Xcode Help Search
    4. 12.4. DOCUMENTATION SHORTCUTS
      1. 12.4.1. Editing Shortcuts
      2. 12.4.2. Quick Help
        1. 12.4.2.1. Transient Quick Help
        2. 12.4.2.2. Persistent Quick Help
      3. 12.4.3. Documentation Shortcuts
    5. 12.5. MAN PAGES
    6. 12.6. CUSTOMIZING HELP
      1. 12.6.1. Managing Subscriptions
      2. 12.6.2. Customizing Quick Help
      3. 12.6.3. Limiting Font Size
    7. 12.7. THE XCODE COMMUNITY
    8. 12.8. SUMMARY
  18. 13. Interface Builder
    1. 13.1. WHAT IS INTERFACE BUILDER?
      1. 13.1.1. Code vs. Interface Builder
      2. 13.1.2. The Three C's of Interface Builder
    2. 13.2. INTERFACE BUILDER WORKFLOW
      1. 13.2.1. Editing NIB Documents in an Xcode Workflow
      2. 13.2.2. Simulating an Interface
      3. 13.2.3. Building Your Project from Interface Builder
    3. 13.3. INTERFACE BUILDER'S INTERFACE
      1. 13.3.1. Inspector Palette
      2. 13.3.2. Library Palette
      3. 13.3.3. Multiple NIB Document Windows
    4. 13.4. CREATING A NIB DOCUMENT
      1. 13.4.1. Choosing a Template
      2. 13.4.2. Adding a New Nib Document to a Project
    5. 13.5. OPENING SISTER LOCALIZATIONS
    6. 13.6. CREATING OBJECTS
    7. 13.7. COPYING, DUPLICATING, AND DELETING OBJECTS
    8. 13.8. SELECTING OBJECTS
      1. 13.8.1. Objects in the Nib Document Window
      2. 13.8.2. Object Order
      3. 13.8.3. View Objects
        1. 13.8.3.1. Selecting Multiple View Objects
        2. 13.8.3.2. Selecting Interior View Objects
        3. 13.8.3.3. Drilling Into View Objects
        4. 13.8.3.4. Object Selection vs. Object Focus
      4. 13.8.4. Adjusting the Selection
    9. 13.9. CONFIGURING OBJECTS
      1. 13.9.1. Moving and Resizing Objects
        1. 13.9.1.1. Sizing Objects to Fit
        2. 13.9.1.2. Making Objects the Same Size
        3. 13.9.1.3. Aligning Objects
        4. 13.9.1.4. View Bounds Indicators
        5. 13.9.1.5. Relative Position Indicators
      2. 13.9.2. Subviews
      3. 13.9.3. Guides
      4. 13.9.4. Inspector Palette
        1. 13.9.4.1. Attributes
        2. 13.9.4.2. Connections
        3. 13.9.4.3. Size
        4. 13.9.4.4. Effects
        5. 13.9.4.5. Bindings
        6. 13.9.4.6. Identity
        7. 13.9.4.7. Inspecting Multiple Objects
    10. 13.10. CONNECTING OBJECTS
      1. 13.10.1. Connections Inspector
        1. 13.10.1.1. Connecting an Outlet
        2. 13.10.1.2. Exploring and Breaking Connections
        3. 13.10.1.3. Connecting Another Object to This Object
        4. 13.10.1.4. Connecting an Action
        5. 13.10.1.5. Connecting an Action to This Object
        6. 13.10.1.6. Pop-Up Connections Panel
        7. 13.10.1.7. Quick Connection
    11. 13.11. CUSTOM CLASSES
      1. 13.11.1. Creating an Instance of a Custom Class
      2. 13.11.2. Adding Custom Outlets to Your Class
      3. 13.11.3. Adding Custom Actions to Your Class
      4. 13.11.4. Initializing Custom Objects at Run Time
    12. 13.12. PLACEHOLDER OBJECTS
      1. 13.12.1. File's Owner
      2. 13.12.2. First Responder
      3. 13.12.3. Other Placeholders
    13. 13.13. DECOMPOSING AN INTERFACE
    14. 13.14. IMPORTING AND EXPORTING CLASSES
    15. 13.15. NIB DOCUMENT FORMATS
      1. 13.15.1. Document Format
      2. 13.15.2. Document Locking
      3. 13.15.3. Checking Deployment Compatibility
      4. 13.15.4. Keeping Backward Compatibility
    16. 13.16. CUSTOMIZING INTERFACE BUILDER
      1. 13.16.1. Customizing the Library Palette
        1. 13.16.1.1. Creating Custom Groups
        2. 13.16.1.2. Saving Custom Objects
      2. 13.16.2. Customizing Document and Compatibility Checking
      3. 13.16.3. Developing Custom Interface Builder Objects
    17. 13.17. SUMMARY
  19. 14. Class Modeling
    1. 14.1. CREATING A CLASS MODEL
      1. 14.1.1. Creating a New Class Model Document
      2. 14.1.2. Creating a Quick Model
    2. 14.2. CLASS MODEL BROWSER
    3. 14.3. CLASS MODEL DIAGRAM
      1. 14.3.1. Nodes
      2. 14.3.2. Tools
      3. 14.3.3. Navigation
        1. 14.3.3.1. Selecting
        2. 14.3.3.2. Quick-Jump to Source
    4. 14.4. EDITING A CLASS MODEL
      1. 14.4.1. Moving Nodes
        1. 14.4.1.1. Automatic Layout
        2. 14.4.1.2. Resizing Nodes
        3. 14.4.1.3. Locking Nodes
        4. 14.4.1.4. Grid and Grid Alignment
      2. 14.4.2. Page Layout
      3. 14.4.3. Changing the Tracking
      4. 14.4.4. Adding Annotations
      5. 14.4.5. Customizing Colors and Fonts
      6. 14.4.6. Hiding Classes and Members
    5. 14.5. SUMMARY
  20. 15. Data Modeling
    1. 15.1. TECHNOLOGY
    2. 15.2. TERMINOLOGY
    3. 15.3. CREATING A DATA MODEL
      1. 15.3.1. Creating Entities
      2. 15.3.2. Creating Properties
        1. 15.3.2.1. Attributes
        2. 15.3.2.2. Relationships
      3. 15.3.3. Adding Fetched Properties
      4. 15.3.4. Adding Fetch Requests
    4. 15.4. DATA MODELING INTERFACE
      1. 15.4.1. Data Model Browser
      2. 15.4.2. Details Pane Views
        1. 15.4.2.1. General Pane
        2. 15.4.2.2. User Info Pane
        3. 15.4.2.3. Configurations Pane
        4. 15.4.2.4. Synchronization Pane
      3. 15.4.3. Data Model Diagram
      4. 15.4.4. Tools
      5. 15.4.5. Duplicating Entities and Properties
      6. 15.4.6. Predicate Builder
        1. 15.4.6.1. Simple Expressions
        2. 15.4.6.2. Compound Expressions
        3. 15.4.6.3. Textual Expressions
    5. 15.5. CREATING AN INSTANT INTERFACE
    6. 15.6. MIGRATING DATA SCHEMAS
      1. 15.6.1. Creating a New Version
      2. 15.6.2. Adding Lightweight Migration Hints
      3. 15.6.3. Creating a Migration Mapping
    7. 15.7. CREATING NSMANAGEDOBJECT SUBCLASSES
    8. 15.8. EXPORTING CLASS METHODS
    9. 15.9. IMPORTING DATA MODELS
    10. 15.10. SUMMARY
  21. 16. Targets
    1. 16.1. TARGETS VS. SUB-PROJECTS
      1. 16.1.1. The Ideal Single-Project Project
      2. 16.1.2. The Ideal Multi-Project Project
      3. 16.1.3. The Project in the Middle
    2. 16.2. THE ANATOMY OF A TARGET
      1. 16.2.1. Target Dependencies
      2. 16.2.2. Target Build Phases
      3. 16.2.3. Target Membership
      4. 16.2.4. Target Build Settings
      5. 16.2.5. Target Build Rules
      6. 16.2.6. Target Product
    3. 16.3. TARGET TYPES
      1. 16.3.1. Native Targets
      2. 16.3.2. External Targets
      3. 16.3.3. Aggregate Targets
      4. 16.3.4. Java and Other Jam-Based Targets
        1. 16.3.4.1. Using Jam-Based Targets
        2. 16.3.4.2. Upgrading Jam-Based Targets
    4. 16.4. CREATING A TARGET
      1. 16.4.1. Target Template Groups
        1. 16.4.1.1. Cocoa Touch Templates
        2. 16.4.1.2. Cocoa Templates
        3. 16.4.1.3. Application Plug-In Templates
        4. 16.4.1.4. BSD Templates
        5. 16.4.1.5. System Plug-Ins Templates
        6. 16.4.1.6. Other Templates
        7. 16.4.1.7. Legacy
      2. 16.4.2. Duplicating Targets
      3. 16.4.3. Deleting Targets
    5. 16.5. BUILD PHASES
      1. 16.5.1. Files in a Build Phase
        1. 16.5.1.1. Adding Items to Targets
        2. 16.5.1.2. Precisely Controlling Target Phase Membership
        3. 16.5.1.3. Removing an Item from a Target
      2. 16.5.2. Build Phase Types
        1. 16.5.2.1. Compiler Phases
        2. 16.5.2.2. Copy Phases
        3. 16.5.2.3. Script Phase
    6. 16.6. BUILD RULES
      1. 16.6.1. Creating Custom Build Rules
        1. 16.6.1.1. Customizing the Build Rule Compiler
        2. 16.6.1.2. Build Rule Variables
        3. 16.6.1.3. Writing the Build Rule's Output Files
      2. 16.6.2. A Build Rule Example
    7. 16.7. DEPENDENCIES
      1. 16.7.1. Adding Target Dependencies
      2. 16.7.2. Adding Project Dependencies
      3. 16.7.3. Strategies for Target Dependencies
    8. 16.8. BUILD SETTINGS
    9. 16.9. JAM-BASED TARGET EDITOR
    10. 16.10. PROPERTIES
    11. 16.11. PRODUCTS
    12. 16.12. EXECUTABLES
    13. 16.13. SUMMARY
  22. 17. Building Projects
    1. 17.1. STARTING AND STOPPING A BUILD
      1. 17.1.1. Selecting the Active Target and Build Configuration
      2. 17.1.2. Controlling the Build of Individual Items
      3. 17.1.3. Building an Inactive Target
    2. 17.2. CLEAN BUILDS
    3. 17.3. PARTIAL BUILDS
    4. 17.4. THE BUILD WINDOW
      1. 17.4.1. Build Transcript Items
        1. 17.4.1.1. Message Groups
        2. 17.4.1.2. Issue, Warning, and Error Statements
        3. 17.4.1.3. Build Summary
      2. 17.4.2. Transcript Item Text
        1. 17.4.2.1. See the Entire Message
        2. 17.4.2.2. Reveal the Source Build Output
        3. 17.4.2.3. Extract Some or All of the Build Log
      3. 17.4.3. Navigating Errors and Warnings
        1. 17.4.3.1. Build Window Editor Pane
        2. 17.4.3.2. Jumping to the Source
        3. 17.4.3.3. Jumping to the Next Warning or Error
      4. 17.4.4. Message Bubbles
    5. 17.5. BUILD PREFERENCES
      1. 17.5.1. Establishing Common Build Locations
      2. 17.5.2. Automating Build Window Behavior
      3. 17.5.3. Other Global Build Options
      4. 17.5.4. Handling Unsaved Files
    6. 17.6. BUILD LOCATIONS
    7. 17.7. BUILD LOCATION STRATEGIES
    8. 17.8. BUILD SETTINGS
      1. 17.8.1. The Scope of Build Settings
      2. 17.8.2. Build Setting Evaluation
      3. 17.8.3. Build Setting Value Substitution
      4. 17.8.4. Conditional Build Settings
      5. 17.8.5. Variable Build Settings
    9. 17.9. BUILD CONFIGURATIONS
    10. 17.10. EDITING BUILD SETTINGS
      1. 17.10.1. Filtering Build Settings
      2. 17.10.2. Viewing Names and Definitions
      3. 17.10.3. A Peek-A-Boo Build Script
      4. 17.10.4. Changing Build Setting Values
      5. 17.10.5. Creating a Conditional Build Setting
      6. 17.10.6. Creating a Custom Build Setting
      7. 17.10.7. Deleting a Build Setting
      8. 17.10.8. Switching Between Build Configurations
    11. 17.11. EDITING BUILD CONFIGURATIONS
    12. 17.12. CONFIGURATION SETTINGS FILES
      1. 17.12.1. Adding a Configuration Settings File
      2. 17.12.2. Using Configuration Settings Files
    13. 17.13. MOVING BUILD SETTINGS AROUND
    14. 17.14. ENVIRONMENT SETTINGS
    15. 17.15. CUSTOMIZING THE BUILD
      1. 17.15.1. Per-File Compiler Flags
      2. 17.15.2. Cross-Development
        1. 17.15.2.1. Installing Cross-Development SDKs
        2. 17.15.2.2. Choosing a Target SDK
        3. 17.15.2.3. Choosing a Deployment Target
        4. 17.15.2.4. Cross-Development Building
        5. 17.15.2.5. Cross-Development Deployment
      3. 17.15.3. Building Universal Binaries
        1. 17.15.3.1. Choosing the Architecture Set
        2. 17.15.3.2. Your Native Architecture
        3. 17.15.3.3. The Valid Architectures
      4. 17.15.4. Selected Build Settings in Detail
        1. 17.15.4.1. Products
        2. 17.15.4.2. Info.plist Files
        3. 17.15.4.3. Search Paths
        4. 17.15.4.4. Precompiled Headers and Prefix Headers
        5. 17.15.4.5. C Compiler
        6. 17.15.4.6. Other Compilers
        7. 17.15.4.7. Linker Settings
        8. 17.15.4.8. Kernel Modules
        9. 17.15.4.9. Deployment
        10. 17.15.4.10. Build Information
          1. 17.15.4.10.1. Tools
          2. 17.15.4.10.2. Standard System Locations
    16. 17.16. THE XCODEBUILD TOOL
      1. 17.16.1. Using the xcodebuild Tool
      2. 17.16.2. Compatibility
    17. 17.17. XCODE AUTOMATOR ACTIONS
    18. 17.18. DISTRIBUTED BUILDS
      1. 17.18.1. Sharing Your System with Others
      2. 17.18.2. Distributing Your Builds to the Workgroup
    19. 17.19. SUMMARY
  23. 18. Debugging
    1. 18.1. RUNNING YOUR APPLICATION
      1. 18.1.1. Monitoring Your Process
      2. 18.1.2. Stopping the Executable
      3. 18.1.3. Choosing the Active Executable
    2. 18.2. DEBUG ANYTIME, ANYWHERE
    3. 18.3. BUILT TO BE DEBUGGED
    4. 18.4. DEBUGGING EXECUTABLES
      1. 18.4.1. The Process Behind the Curtain
      2. 18.4.2. Debugger Spoken Here
    5. 18.5. ATTACHING TO RUNNING EXECUTABLES
    6. 18.6. IN-EDITOR DEBUGGING
      1. 18.6.1. Editing Breakpoints
      2. 18.6.2. Controlling Execution
        1. 18.6.2.1. Selecting the Thread and Stack Frame
        2. 18.6.2.2. Running and Stepping Through Code
        3. 18.6.2.3. Hover Step Controls
      3. 18.6.3. Viewing Variables
    7. 18.7. THE DEBUGGER WINDOW
      1. 18.7.1. The Threads Pane
      2. 18.7.2. The Listing or Editor Pane
      3. 18.7.3. The Variables Pane
        1. 18.7.3.1. Variable Groups
        2. 18.7.3.2. Exploring Variables
        3. 18.7.3.3. Value Summaries
        4. 18.7.3.4. Variable Types
    8. 18.8. CONTROLLING THE DEBUGGER
      1. 18.8.1. Pause and Continue
      2. 18.8.2. Step Over and Into
      3. 18.8.3. Stepping Out
      4. 18.8.4. Stepping Over and Into Single Instructions
      5. 18.8.5. Continue to Here
    9. 18.9. THE MINI-DEBUGGER
    10. 18.10. BREAKPOINTS
      1. 18.10.1. Breakpoint Types
      2. 18.10.2. Breakpoints Window
        1. 18.10.2.1. Breakpoint Groups
        2. 18.10.2.2. Breakpoint Details
      3. 18.10.3. Breakpoint Details in an Editor Pane
      4. 18.10.4. Deleting Breakpoints
      5. 18.10.5. Enabling and Disabling Breakpoints
      6. 18.10.6. Creating Symbolic Breakpoints
      7. 18.10.7. Iffy Breakpoints
        1. 18.10.7.1. Conditional Breakpoint Example
        2. 18.10.7.2. Conditional Expressions
      8. 18.10.8. Breakpoint Ignore Count
      9. 18.10.9. Breakpoint Actions
        1. 18.10.9.1. Log a Message
        2. 18.10.9.2. Make a Sound
        3. 18.10.9.3. Have the Debugger Do Something Else
        4. 18.10.9.4. Run a Script
      10. 18.10.10. Breakpoint Continuation
      11. 18.10.11. Importing and Exporting Breakpoints
      12. 18.10.12. Breakpoint Templates
    11. 18.11. EXAMINING DATA
      1. 18.11.1. Scalar Formats
      2. 18.11.2. Viewing Data in Another Window
      3. 18.11.3. Viewing Global Variables
      4. 18.11.4. Expressions
    12. 18.12. DATA FORMATTERS
      1. 18.12.1. Creating a Custom Data Formatter
      2. 18.12.2. Troubleshooting Data Formatters
      3. 18.12.3. Beyond Data Formatter Strings
      4. 18.12.4. Object Descriptions
    13. 18.13. WATCHPOINTS
    14. 18.14. CHANGING DATA AND CODE
      1. 18.14.1. The Magic Fix
      2. 18.14.2. Magic Fix Limitations
    15. 18.15. DEBUGGER CONSOLE
    16. 18.16. SHARED LIBRARIES
    17. 18.17. CUSTOM EXECUTABLES
      1. 18.17.1. General Settings
      2. 18.17.2. Arguments and Environment
      3. 18.17.3. Debugging
      4. 18.17.4. Selecting an Executable
    18. 18.18. DEBUGGER PREFERENCES
    19. 18.19. REMOTE DEBUGGING
    20. 18.20. DEBUGGING AIDES
      1. 18.20.1. Catching a Throw
      2. 18.20.2. Stopping for Debugger() and DebugStr()
      3. 18.20.3. Guard Malloc
      4. 18.20.4. Debug Variables
    21. 18.21. SUMMARY
  24. 19. Performance Analysis
    1. 19.1. PERFORMANCE BASICS
      1. 19.1.1. If It isn't Broken . . .
      2. 19.1.2. Embrace Your Own Ignorance
      3. 19.1.3. Improve Performance Systematically
    2. 19.2. PREPARING FOR ANALYSIS
    3. 19.3. SHARK
      1. 19.3.1. Profile View
      2. 19.3.2. Code View
      3. 19.3.3. Stack View
      4. 19.3.4. Refining the Analysis
      5. 19.3.5. Saving and Comparing Shark Sessions
      6. 19.3.6. Merging Shark Sessions
      7. 19.3.7. Using Shark to Analyze Remote and iPhone Applications
      8. 19.3.8. Learn More About Shark
    4. 19.4. INSTRUMENTS
      1. 19.4.1. Terminology
      2. 19.4.2. Recording Trace Data
        1. 19.4.2.1. Accumulating and Discarding Traces
        2. 19.4.2.2. The Run Browser
      3. 19.4.3. Analyzing Trace Data
        1. 19.4.3.1. Tracks
        2. 19.4.3.2. More Detail
        3. 19.4.3.3. Even More Detail
        4. 19.4.3.4. Timeline
        5. 19.4.3.5. Peeking and Navigating Using the Playhead
        6. 19.4.3.6. Using Flags
        7. 19.4.3.7. Setting the Inspection Range
      4. 19.4.4. Customizing Instruments
        1. 19.4.4.1. Adding Instruments
        2. 19.4.4.2. Removing Instruments
      5. 19.4.5. Saving and Exporting Instrument Data
      6. 19.4.6. Creating Instrument Templates
      7. 19.4.7. Using Instruments by Itself
        1. 19.4.7.1. Choosing the Target Process
        2. 19.4.7.2. Using Quick Start Keys
        3. 19.4.7.3. Mini Mode
        4. 19.4.7.4. Analyzing an iPhone Wirelessly
      8. 19.4.8. Typical Scenarios
        1. 19.4.8.1. Code Performance
        2. 19.4.8.2. Retain Problem
        3. 19.4.8.3. Spinning Pizza of Death
        4. 19.4.8.4. Repeating a User Interface Test
    5. 19.5. SUMMARY
  25. 20. Unit Testing
    1. 20.1. HOW UNIT TESTS WORK
    2. 20.2. GETTING STARTED WITH UNIT TESTS
      1. 20.2.1. Independent Unit Tests
      2. 20.2.2. Dependent Unit Tests
      3. 20.2.3. iPhone Unit Tests
    3. 20.3. ADDING A UNIT TEST TARGET
      1. 20.3.1. Unit Test Target Dependencies
        1. 20.3.1.1. Independent Unit Test Dependencies
        2. 20.3.1.2. Dependent Unit Test Dependencies
      2. 20.3.2. Configuring an Independent/Logic Unit Test
      3. 20.3.3. Configuring a Mac OS X Dependent Unit Test
        1. 20.3.3.1. Testing an Application
        2. 20.3.3.2. Preparing Your Application
        3. 20.3.3.3. Testing Libraries and Frameworks
      4. 20.3.4. Configuring an iPhone Application Test
    4. 20.4. CREATING A UNIT TEST
      1. 20.4.1. Common Test Initialization
      2. 20.4.2. Objective-C Tests
      3. 20.4.3. Objective-C Test Macros
      4. 20.4.4. C++ Tests
        1. 20.4.4.1. C++ Test Registration
        2. 20.4.4.2. C++ Test Macros
        3. 20.4.4.3. C++ Test Execution
    5. 20.5. DEBUGGING UNIT TESTS
      1. 20.5.1. Debugging iPhone Application Tests
      2. 20.5.2. Debugging Dependent Mac OS X Unit Tests
      3. 20.5.3. Debugging Independent Unit Tests
    6. 20.6. SUMMARY
  26. 21. Sharing Source
    1. 21.1. SHARING VIA XCODE
      1. 21.1.1. Source Tree Basics
      2. 21.1.2. Source Control Basics
    2. 21.2. SOURCE TREES
      1. 21.2.1. Define a Source Tree
      2. 21.2.2. Source Tree References
    3. 21.3. SOURCE CONTROL
      1. 21.3.1. Using Source Control
      2. 21.3.2. Defining a Repository
        1. 21.3.2.1. Repository on a Local File System
        2. 21.3.2.2. Repository Access via a Web Server
        3. 21.3.2.3. Subversion Server via a Network or SSH
        4. 21.3.2.4. Checking Your Repository Definition
      3. 21.3.3. Source Control Options
      4. 21.3.4. Your SSH Certificates
      5. 21.3.5. Creating a Subversion Repository
      6. 21.3.6. Filtering Out Noise
        1. 21.3.6.1. Omitting the build Folder
        2. 21.3.6.2. Excluding the build Folder
        3. 21.3.6.3. Excluding Other Noise Files
      7. 21.3.7. Browsing Repositories
      8. 21.3.8. Adding a Project to Source Control
      9. 21.3.9. Checking Out a Project
      10. 21.3.10. Exporting a Project
      11. 21.3.11. Configuring a Project for Source Control
      12. 21.3.12. Project Roots
      13. 21.3.13. Source Control Interface
      14. 21.3.14. SCM Smart Group and Window
      15. 21.3.15. Committing Changes
      16. 21.3.16. Discarding Changes
      17. 21.3.17. Adding Files to Source Control
      18. 21.3.18. Deleting Files under Source Control
      19. 21.3.19. Renaming Files under Source Control
      20. 21.3.20. Updating Files
      21. 21.3.21. Comparing Revisions
      22. 21.3.22. Merging Changes
      23. 21.3.23. Viewing Annotations
      24. 21.3.24. Resolving Conflicts
      25. 21.3.25. Going Offline
      26. 21.3.26. Source Control and the Project Document
    4. 21.4. SOURCE CONTROL VS. SNAPSHOTS
    5. 21.5. SUMMARY
  27. 22. Using the Organizer
    1. 22.1. PROJECTS & SOURCES
      1. 22.1.1. Adding Items to the Organizer
      2. 22.1.2. Embracing Foreign Projects
      3. 22.1.3. Searching Organizer Folders
      4. 22.1.4. Taking Snapshots
    2. 22.2. USING ORGANIZER ACTIONS
      1. 22.2.1. Automatically Created Actions
      2. 22.2.2. Creating Custom Actions
        1. 22.2.2.1. The Anatomy of an Action
        2. 22.2.2.2. Action Types
        3. 22.2.2.3. The Action Folder Hierarchy
        4. 22.2.2.4. Action Directory
        5. 22.2.2.5. Input and Output
      3. 22.2.3. Preserving and Sharing Actions
      4. 22.2.4. Action Ideas
    3. 22.3. DEVICES
      1. 22.3.1. Adding and Removing Devices
      2. 22.3.2. Installing Provisioning Profiles
      3. 22.3.3. Managing Development Applications
      4. 22.3.4. Downloading Application Data
      5. 22.3.5. Installing Alternate Operating Systems
      6. 22.3.6. Reviewing Crash Logs
      7. 22.3.7. Monitoring the Device's Console
      8. 22.3.8. Capturing Screenshots and the Default Image
    4. 22.4. IPHONE DEVELOPMENT
      1. 22.4.1. Crash Logs
      2. 22.4.2. Provisioning Profiles
      3. 22.4.3. Screenshots
      4. 22.4.4. Software Images
    5. 22.5. SUMMARY
  28. 23. Customizing Xcode
    1. 23.1. XCODE PREFERENCES
    2. 23.2. KEY BINDINGS
      1. 23.2.1. Menu Key Bindings
      2. 23.2.2. Text Key Bindings
    3. 23.3. USING AN EXTERNAL EDITOR
      1. 23.3.1. Using an Alternate Editor Once
      2. 23.3.2. Specifying the Default Editor
      3. 23.3.3. Using an External Editor
      4. 23.3.4. Supported External Editors
    4. 23.4. TEXT MACROS
      1. 23.4.1. Creating Text Macro Definitions
        1. 23.4.1.1. Macro Definition
        2. 23.4.1.2. Text Macro Properties
        3. 23.4.1.3. Placeholders
        4. 23.4.1.4. Property References
      2. 23.4.2. Sanctioned Text Macro Customization
    5. 23.5. EXPERT PREFERENCES
      1. 23.5.1. Projects and Files
      2. 23.5.2. Editing
      3. 23.5.3. Functions Menu
      4. 23.5.4. Building
      5. 23.5.5. Distributed Builds
      6. 23.5.6. Debugging
      7. 23.5.7. Snapshots
      8. 23.5.8. Source Code Management
      9. 23.5.9. Documentation
    6. 23.6. TEMPLATES
      1. 23.6.1. File Templates
      2. 23.6.2. Template Macros
      3. 23.6.3. Project Templates
        1. 23.6.3.1. Project Templates with Macros
        2. 23.6.3.2. File References in Project Templates
        3. 23.6.3.3. Problems with Project Templates
        4. 23.6.3.4. Project Template Portability
      4. 23.6.4. Target Templates
    7. 23.7. USER SCRIPTS
      1. 23.7.1. The StartupScript
      2. 23.7.2. Creating a User Script
      3. 23.7.3. User Script Options
      4. 23.7.4. Anatomy of a User Script
      5. 23.7.5. User Script Variables
        1. 23.7.5.1. PBXFilePath
        2. 23.7.5.2. PBXSelectedText and PBXAllText
        3. 23.7.5.3. PBXTextLength, PBXSelectionStart, PBXSelectionEnd, and PBXSelectionLength
        4. 23.7.5.4. PBXSelection
      6. 23.7.6. Script Helpers
        1. 23.7.6.1. Prompt for a String
        2. 23.7.6.2. Ask for an Existing File or Folder
        3. 23.7.6.3. Prompt for a New File
        4. 23.7.6.4. Ask for an Application
    8. 23.8. APPLESCRIPT
    9. 23.9. RESETTING YOUR XCODE CUSTOMIZATIONS
    10. 23.10. SUMMARY