You are previewing Beginning Xcode®.
O'Reilly logo
Beginning Xcode®

Book Description

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

  1. Copyright
  2. Credits
  3. About the Author
  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
      1. Additional Information
      2. Text Styles
    6. Source Code
    7. Bonus Sections
    8. Errata
    9. 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 Group
      2. 2.1.2. Smart Groups
    2. 2.2. Menus
    3. 2.3. Editor
    4. 2.4. Data Mining
    5. 2.5. Getting Help
    6. 2.6. Building
    7. 2.7. Getting It Right
    8. 2.8. Collaboration
    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. Altering Source Groups and Their Contents
      4. 3.2.4. Showing and Hiding Groups
      5. 3.2.5. Reusing Your Layout
      6. 3.2.6. Creating Simple Smart Groups
      7. 3.2.7. Deleting Simple Smart Groups
    3. 3.3. Details, Details
      1. 3.3.1. Showing and Hiding Details
      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. 3.9. Exercise
  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__?
      5. 4.1.5. Closing a Project
      6. 4.1.6. Opening One or More Projects
      7. 4.1.7. Renaming and Relocating Projects
      8. 4.1.8. Upgrading Projects
      9. 4.1.9. Old Project Templates
      10. 4.1.10. Importing ProjectBuilderWO (WebObjects) Projects
      11. 4.1.11. Migrating from CodeWarrior to Xcode
      12. 4.1.12. Migrating from Anything Else to Xcode
    2. 4.2. Project Attributes
    3. 4.3. Summary
    4. 4.4. Exercise
  10. 5. Sources
    1. 5.1. References
    2. 5.2. Organizing Sources
      1. 5.2.1. Default References
      2. 5.2.2. Sharing a Subfolder
      3. 5.2.3. Everything Is Relative
      4. 5.2.4. Outside the Box
      5. 5.2.5. Bad References
    3. 5.3. Source Item Types
    4. 5.4. Creating New Source Files
    5. 5.5. Adding Existing Sources
      1. 5.5.1. Selecting the Items to Add
        1. 5.5.1.1. Copying Items into the Destination Group's Folder
        2. 5.5.1.2. Reference Type
        3. 5.5.1.3. Text Encoding
        4. 5.5.1.4. Recursively Creating Groups and Creating Folder References
        5. 5.5.1.5. Adding To Targets
      2. 5.5.2. Adding an Open File
    6. 5.6. Source Attributes
      1. 5.6.1. Changing Attributes for Multiple Items
      2. 5.6.2. Ridding Targets of Unwanted Files
    7. 5.7. Reorganizing Sources
    8. 5.8. Summary
    9. 5.9. Exercise
  11. 6. Editing Text
    1. 6.1. Windows and Panes
      1. 6.1.1. Editing Panes
      2. 6.1.2. Closing and Saving Editor Panes
    2. 6.2. The Editor Pane
      1. 6.2.1. Scroll Bars
      2. 6.2.2. Split-Pane Editing
      3. 6.2.3. Gutter
      4. 6.2.4. Navigation Bar
      5. 6.2.5. Status and Toolbars
    3. 6.3. Display Options
    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
        1. 6.4.4.1. Functions
        2. 6.4.4.2. Bookmarks
        3. 6.4.4.3. Breakpoints
      5. 6.4.5. Navigation Between 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 to the Header or Source File
        6. 6.4.5.6. Jumping to the Definition
    5. 6.5. Editing
      1. 6.5.1. Selecting Text
        1. 6.5.1.1. Selecting Columns
        2. 6.5.1.2. Selecting Blocks
        3. 6.5.1.3. Selecting 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. Syntax-Aware Editing
      1. 6.6.1. Syntax Coloring
      2. 6.6.2. Changing Syntax Coloring for a Single File
    7. 6.7. Indenting Text
      1. 6.7.1. Re-indenting Text
      2. 6.7.2. Tab Settings for a Single File
    8. 6.8. Code Sense
      1. 6.8.1. Invoking Code-Completion
      2. 6.8.2. Rebuilding the Code Sense Index
    9. 6.9. Text Macros
    10. 6.10. Shell Scripts
    11. 6.11. Spell Checking
      1. 6.11.1. Interactive Checking
      2. 6.11.2. Finding One Word
      3. 6.11.3. Checking While Typing
    12. 6.12. File Encoding
    13. 6.13. Localizing Files
    14. 6.14. Printing
    15. 6.15. Services
    16. 6.16. Using an External Editor
    17. 6.17. Summary
  12. 7. Searching
    1. 7.1. Searching a Text File
      1. 7.1.1. Searching for a Text Pattern
      2. 7.1.2. Searching for a Regular Expression
        1. 7.1.2.1. Regular Expressions
          1. 7.1.2.1.1. Patterns
          2. 7.1.2.1.2. Operators
        2. 7.1.2.2. More about Regular Expressions
    2. 7.2. Replacing Text
      1. 7.2.1. Replacing Text Using Regular Expressions
    3. 7.3. Search History
    4. 7.4. Searching Multiple Files
      1. 7.4.1. Find Results Smart Group
      2. 7.4.2. Project Search History
      3. 7.4.3. Replacing Text in Multiple Files
      4. 7.4.4. Batch File Options
    5. 7.5. Search Shortcuts
    6. 7.6. Searching Lists
    7. 7.7. Summary
    8. 7.8. Exercise
  13. 8. Class Browser
    1. 8.1. Navigating the Class Browser
    2. 8.2. Class Browser Option Sets
    3. 8.3. Browser Shortcuts
    4. 8.4. Summary
  14. 9. Help and Documentation
    1. 9.1. Help and Documentation Window
      1. 9.1.1. Browsing the Apple Developer Connection Reference Library
      2. 9.1.2. Navigating Help Documents
      3. 9.1.3. Bookmarks
      4. 9.1.4. External Links
      5. 9.1.5. Extended Documentation
      6. 9.1.6. Controlling Text Size
    2. 9.2. Searching Documentation
      1. 9.2.1. Full-Text Search
      2. 9.2.2. Search Expressions
      3. 9.2.3. API Search
    3. 9.3. Man Pages
    4. 9.4. AppleScript Dictionaries
    5. 9.5. Staying Up-To-Date
    6. 9.6. Documentation Shortcuts
    7. 9.7. Adding Custom Documentation
    8. 9.8. The Xcode Community
    9. 9.9. Summary
  15. 10. Interface Builder
    1. 10.1. NIB Files
      1. 10.1.1. Serialization
      2. 10.1.2. Cocoa versus Carbon
      3. 10.1.3. Xcode Integration
    2. 10.2. Interface Builder's Interface
      1. 10.2.1. Multiple NIB Document Windows
      2. 10.2.2. Building Interfaces
        1. 10.2.2.1. Opening Existing NIB Files
        2. 10.2.2.2. Importing Resources
      3. 10.2.3. Saving NIB Files
      4. 10.2.4. Making Backups
    3. 10.3. Creating Objects
      1. 10.3.1. Creating Menus
      2. 10.3.2. Creating Windows
      3. 10.3.3. Creating Other Objects
      4. 10.3.4. Selecting Objects
      5. 10.3.5. Deleting Objects
    4. 10.4. Testing an Interface
    5. 10.5. Editing Objects
      1. 10.5.1. Moving and Resizing Objects
        1. 10.5.1.1. Shrinking Objects
        2. 10.5.1.2. Making Objects the Same Size
        3. 10.5.1.3. Aligning Objects
        4. 10.5.1.4. Grouping Objects
      2. 10.5.2. Subviews
      3. 10.5.3. Guides
      4. 10.5.4. Inspector Palette
        1. 10.5.4.1. Attributes
        2. 10.5.4.2. Connections
        3. 10.5.4.3. Size
        4. 10.5.4.4. Bindings
        5. 10.5.4.5. Custom Class
        6. 10.5.4.6. Accessibility
        7. 10.5.4.7. Help
        8. 10.5.4.8. AppleScript
        9. 10.5.4.9. Sherlock
        10. 10.5.4.10. Control
        11. 10.5.4.11. Layout
      5. 10.5.5. Tab Order
    6. 10.6. Custom Classes
      1. 10.6.1. Creating Classes in Interface Builder
      2. 10.6.2. Importing and Exporting Classes
    7. 10.7. NIB File Formats
      1. 10.7.1. Compatibility Checking
    8. 10.8. Customizing Interface Builder
    9. 10.9. Summary
    10. 10.10. Exercise
  16. 11. Class Modeling
    1. 11.1. Creating a Class Model
    2. 11.2. Creating a Quick Model
    3. 11.3. Class Model Browser
    4. 11.4. Class Model Diagram
      1. 11.4.1. Nodes
      2. 11.4.2. Tools
      3. 11.4.3. Navigation
        1. 11.4.3.1. Selecting
        2. 11.4.3.2. Quick-Jump to Source
    5. 11.5. Editing a Class Model
      1. 11.5.1. Moving Nodes
        1. 11.5.1.1. Automatic Layout
        2. 11.5.1.2. Resizing Nodes
        3. 11.5.1.3. Locking Nodes
        4. 11.5.1.4. Grid and Grid Alignment
      2. 11.5.2. Page Layout
      3. 11.5.3. Changing the Tracking
      4. 11.5.4. Adding Annotations
      5. 11.5.5. Customizing Colors and Fonts
      6. 11.5.6. Hiding Classes and Members
    6. 11.6. Summary
  17. 12. Data Modeling
    1. 12.1. Technology
    2. 12.2. Terminology
    3. 12.3. Creating a Data Model
      1. 12.3.1. Creating Entities
      2. 12.3.2. Creating Properties
        1. 12.3.2.1. Attributes
        2. 12.3.2.2. Relationships
      3. 12.3.3. Adding Fetched Properties
      4. 12.3.4. Adding Fetch Requests
    4. 12.4. Data Modeling Interface
      1. 12.4.1. Data Model Browser
      2. 12.4.2. Detail Pane Views
        1. 12.4.2.1. General Pane
        2. 12.4.2.2. User Info Pane
        3. 12.4.2.3. Configurations Pane
      3. 12.4.3. Data Model Diagram
      4. 12.4.4. Tools
      5. 12.4.5. Duplicating Entities and Properties
      6. 12.4.6. Predicate Builder
        1. 12.4.6.1. Simple Expressions
        2. 12.4.6.2. Compound Expressions
        3. 12.4.6.3. Textual Expressions
    5. 12.5. Creating an Instant Interface
    6. 12.6. Creating NSManagedObject Subclasses
    7. 12.7. Exporting Class Methods
    8. 12.8. Summary
  18. 13. Targets
    1. 13.1. Target Components
    2. 13.2. Target Types
      1. 13.2.1. Native Targets
      2. 13.2.2. Jam-Based Targets
        1. 13.2.2.1. Upgrading Jam-Based Targets
      3. 13.2.3. External Targets
      4. 13.2.4. Aggregate Targets
    3. 13.3. Creating a Target
      1. 13.3.1. Target Template Groups
        1. 13.3.1.1. Special Templates
        2. 13.3.1.2. BSD Templates
        3. 13.3.1.3. Carbon
        4. 13.3.1.4. Cocoa
        5. 13.3.1.5. Java
        6. 13.3.1.6. Kernel Extension
        7. 13.3.1.7. Legacy
      2. 13.3.2. Duplicating Targets
      3. 13.3.3. Deleting Targets
    4. 13.4. Build Phases
      1. 13.4.1. Files in a Build Phase
      2. 13.4.2. Build Phase Types
        1. 13.4.2.1. Compiler Phases
        2. 13.4.2.2. Copy Phases
        3. 13.4.2.3. Script Phase
    5. 13.5. Build Rules
    6. 13.6. Target Dependencies
      1. 13.6.1. Adding Target and Project Dependencies
      2. 13.6.2. Strategies for Target Dependencies
    7. 13.7. Build Settings
    8. 13.8. Jam-Based Target Editor
    9. 13.9. Properties
    10. 13.10. Products
    11. 13.11. Executables
    12. 13.12. Summary
    13. 13.13. Exercise
  19. 14. Building Projects
    1. 14.1. Starting and Stopping a Build
    2. 14.2. Clean Builds
      1. 14.2.1. Controlling the Build of Individual Items
      2. 14.2.2. Selecting the Active Target and Build Configuration
      3. 14.2.3. Building an Inactive Target
    3. 14.3. Partial Builds
    4. 14.4. The Build Window
      1. 14.4.1. Navigating Errors and Warnings
      2. 14.4.2. Opening and Closing the Build Window Automatically
    5. 14.5. Common Build Preferences
    6. 14.6. Build Locations
    7. 14.7. Build Location Strategies
    8. 14.8. Build Settings
      1. 14.8.1. The Scope of Build Settings
      2. 14.8.2. Build Setting Evaluation
    9. 14.9. Build Configurations
    10. 14.10. Editing Build Settings
      1. 14.10.1. Creating and Deleting a Build Setting
      2. 14.10.2. Build Setting Values
      3. 14.10.3. Switching Between Build Configurations
    11. 14.11. Editing Build Configurations
    12. 14.12. Configuration Files
      1. 14.12.1. Adding a Configuration File
      2. 14.12.2. Using Configuration Files
    13. 14.13. Moving Build Settings Around
    14. 14.14. Environment Settings
    15. 14.15. Customizing the Build
      1. 14.15.1. Per-File Compiler Flags
      2. 14.15.2. Cross-Development
      3. 14.15.3. Building Universal Binaries
      4. 14.15.4. Disallowing ZeroLink
      5. 14.15.5. Build Settings in Detail
        1. 14.15.5.1. Products
        2. 14.15.5.2. Info.plist files
        3. 14.15.5.3. Search Paths
        4. 14.15.5.4. Pre-compiled Headers and Prefix Headers
        5. 14.15.5.5. C Compiler
        6. 14.15.5.6. Java Compiler
        7. 14.15.5.7. Other Compilers
        8. 14.15.5.8. Linker Settings
        9. 14.15.5.9. Kernel Modules
        10. 14.15.5.10. Deployment
        11. 14.15.5.11. Build Information
          1. 14.15.5.11.1. Tools
          2. 14.15.5.11.2. Standard System Locations
    16. 14.16. The xcodebuild Tool
      1. 14.16.1. Using the xcodebuild Tool
      2. 14.16.2. Compatibility
    17. 14.17. Distributed Builds
    18. 14.18. Summary
    19. 14.19. Exercise
  20. 15. Debugging
    1. 15.1. Running an Application
      1. 15.1.1. Choosing the Active Executable
      2. 15.1.2. Built to be Debugged
    2. 15.2. Debugging Executables
    3. 15.3. Attaching to Running Executables
    4. 15.4. The Debugger Window
      1. 15.4.1. The Threads Pane
      2. 15.4.2. The Listing or Editor Pane
      3. 15.4.3. The Variables Pane
    5. 15.5. Controlling the Debugger
    6. 15.6. Debug Visualizer
    7. 15.7. Breakpoints
      1. 15.7.1. Breakpoint Types
      2. 15.7.2. Breakpoints Window
      3. 15.7.3. Deleting Breakpoints
      4. 15.7.4. Grouping Breakpoints
      5. 15.7.5. Enabling and Disabling Breakpoints
      6. 15.7.6. Creating Symbolic Breakpoints
      7. 15.7.7. Iffy Breakpoints
      8. 15.7.8. Breakpoint Actions
      9. 15.7.9. Breakpoint Continuation
      10. 15.7.10. Importing and Exporting Breakpoints
      11. 15.7.11. Breakpoint Templates
    8. 15.8. Examining Data
      1. 15.8.1. Viewing Global Variables
      2. 15.8.2. Expressions
    9. 15.9. Data Formatters
      1. 15.9.1. Beyond Data Formatter Strings
      2. 15.9.2. Object Descriptions
    10. 15.10. Watchpoints
    11. 15.11. Changing Data and Code
      1. 15.11.1. The Magic Fix
      2. 15.11.2. Magic Fix Limiations
    12. 15.12. Debugger Console
    13. 15.13. Shared Libraries
    14. 15.14. Custom Executables
      1. 15.14.1. General Settings
      2. 15.14.2. Arguments and Environment
      3. 15.14.3. Debugging
      4. 15.14.4. Selecting an Executable
    15. 15.15. Debugger Preferences
    16. 15.16. Remote Debugging
    17. 15.17. Debugging Aides
      1. 15.17.1. Catching a Catch
      2. 15.17.2. Stopping for Debugger() and DebugStr()
      3. 15.17.3. Guard Malloc
      4. 15.17.4. Debug Variables
    18. 15.18. Summary
  21. 16. Performance Analysis
    1. 16.1. Performance Basics
    2. 16.2. Preparing for Analysis
    3. 16.3. Shark
      1. 16.3.1. Profile View
      2. 16.3.2. Statistical Sampling
      3. 16.3.3. Code View
      4. 16.3.4. Stack View
      5. 16.3.5. Refining the Analysis
      6. 16.3.6. Saving and Comparing Shark Sessions
      7. 16.3.7. Merging Shark Sessions
      8. 16.3.8. Tip of the Iceberg
    4. 16.4. Sampler
    5. 16.5. MallocDebug
      1. 16.5.1. Pruning
    6. 16.6. ObjectAlloc
      1. 16.6.1. Global Allocations
      2. 16.6.2. History Graph
      3. 16.6.3. Instance Browser
      4. 16.6.4. Call Stack
    7. 16.7. Other Performance and Analysis Tools
    8. 16.8. Summary
    9. 16.9. Exercise
  22. 17. Unit Testing
    1. 17.1. How Unit Tests Work
    2. 17.2. Preparing for Unit Tests
      1. 17.2.1. Independent Unit Tests
      2. 17.2.2. Dependent Unit Tests
      3. 17.2.3. Target Dependencies
    3. 17.3. Adding a Unit Test Target
      1. 17.3.1. Configuring an Independent Unit Test
      2. 17.3.2. Configuring a Dependent Unit Test
        1. 17.3.2.1. Testing Libraries and Frameworks
        2. 17.3.2.2. Preparing Your Application
    4. 17.4. Creating a Unit Test
      1. 17.4.1. Inter-test Initialization
      2. 17.4.2. Objective-C Tests
      3. 17.4.3. Objective-C Test Macros
      4. 17.4.4. C++ Tests
        1. 17.4.4.1. C++ Test Registration
        2. 17.4.4.2. C++ Test Macros
        3. 17.4.4.3. C++ Test Execution
    5. 17.5. Debugging Unit Tests
      1. 17.5.1. Debugging Dependent Unit Tests
      2. 17.5.2. Debugging Independent Unit Tests
    6. 17.6. Summary
    7. 17.7. Exercise
  23. 18. Sharing Source
    1. 18.1. Source Trees
      1. 18.1.1. Define a Source Tree
      2. 18.1.2. Source Tree References
    2. 18.2. Source Control
      1. 18.2.1. Installing the Subversion Client
      2. 18.2.2. Creating a Repository
      3. 18.2.3. Adding a Project to Source Control
      4. 18.2.4. Configuring a Project for Source Control
      5. 18.2.5. Source Control Interface
      6. 18.2.6. SCM Smart Group
      7. 18.2.7. Committing Changes
      8. 18.2.8. Saving Before Committing
      9. 18.2.9. Discarding Changes
      10. 18.2.10. Adding Files to Source Control
      11. 18.2.11. Deleting Files under Source Control
      12. 18.2.12. Renaming Files under Source Control
      13. 18.2.13. Updating Files
      14. 18.2.14. Comparing Revisions
      15. 18.2.15. Customizing Compare
      16. 18.2.16. Merging Changes
      17. 18.2.17. Viewing Annotations
      18. 18.2.18. Resolving Conflicts
      19. 18.2.19. Going Offline
      20. 18.2.20. SCM and the Project Document
    3. 18.3. Summary
  24. 19. Customizing Xcode
    1. 19.1. Xcode Preferences
    2. 19.2. Key Bindings
      1. 19.2.1. Menu Key Bindings
    3. 19.3. Expert Preferences
      1. 19.3.1. Projects and Files
      2. 19.3.2. Editing
      3. 19.3.3. Functions Menu
      4. 19.3.4. Building
      5. 19.3.5. Distributed Builds
      6. 19.3.6. Debugging
      7. 19.3.7. Source Code Management
      8. 19.3.8. Documentation
    4. 19.4. Templates
      1. 19.4.1. File Templates
      2. 19.4.2. Template Macros
      3. 19.4.3. Project Templates
        1. 19.4.3.1. Project Templates with Macros
        2. 19.4.3.2. File References in Project Templates
        3. 19.4.3.3. Problems with Project Templates
        4. 19.4.3.4. Project Template Portability
      4. 19.4.4. Target Templates
    5. 19.5. Custom Scripts
      1. 19.5.1. The StartupScript
      2. 19.5.2. The Default StartupScript
      3. 19.5.3. Anatomy of a Custom Script
      4. 19.5.4. Menu Script Definitions
        1. 19.5.4.1. PBXName
        2. 19.5.4.2. PBXKeyEquivalent
        3. 19.5.4.3. PBXInput
        4. 19.5.4.4. PBXOutput
        5. 19.5.4.5. PBXIncrementalDisplay
        6. 19.5.4.6. PBXArgument
        7. 19.5.4.7. PBXNewScript
      5. 19.5.5. Custom Script Variables
        1. 19.5.5.1. PBXSelectedText and PBXAllText
        2. 19.5.5.2. PBXTextLength, PBXSelectionStart, PBXSelectionEnd, and PBXSelectionLength
        3. 19.5.5.3. PBXSelection
      6. 19.5.6. Script Helpers
        1. 19.5.6.1. Prompt for a String
        2. 19.5.6.2. Ask for an Existing File or Folder
        3. 19.5.6.3. Prompt for a New File
        4. 19.5.6.4. Ask for an Application
        5. 19.5.6.5. Altering the Xcode Menus
    6. 19.6. AppleScript
    7. 19.7. Summary
    8. 19.8. Exercise
  25. A. Exercise Answers
  26. B. Project Templates
    1. B.1. Empty Projects
    2. B.2. Action
    3. B.3. Application
    4. B.4. Bundle
    5. B.5. Command-Line Utility
    6. B.6. Dynamic Library
    7. B.7. Framework
    8. B.8. Java
    9. B.9. Kernel Extension
    10. B.10. Loadable Bundle
    11. B.11. Standard Apple Plug-ins
    12. B.12. Static Library
    13. B.13. WebObjects