You are previewing Xcode 5 Start to Finish: iOS and OS X Development.
O'Reilly logo
Xcode 5 Start to Finish: iOS and OS X Development

Book Description

Use Xcode 5 to Write Great iOS and OS X Apps!


Xcode 5 Start to Finish will help you use the tools in Apple’s Xcode 5 to improve productivity, write great code, and leverage the newest iOS 7 and OS X Mavericks features.


Drawing on thirty years of experience developing for Apple platforms and helping others do so, Fritz Anderson shows you a complete best-practice Xcode workflow. Through three full sample projects, you’ll learn to integrate testing, source control, and other key skills into a high-efficiency process that works.


Anderson shows you better ways to storyboard, instrument, build, and compile code, and helps you apply innovations ranging from Quick Look to Preview Assistant. By the time you’re finished, you’ll have the advanced Xcode skills to develop outstanding software.


Coverage includes

  • Setting breakpoints and tracing execution for active debugging

  • Creating libraries by adding and building new targets

  • Integrating Git or Subversion version control

  • Creating iOS projects with MVC design

  • Designing Core Data schemas for iOS apps

  • Linking data models to views

  • Designing UI views with Interface Builder

  • Using the improved Xcode 5 Autolayout editor

  • Improving reliability with unit testing

  • Simplifying iOS provisioning

  • Leveraging refactoring and continual error checking

  • Using OS X bindings, bundles, packages, frameworks, and property lists

  • Localizing your apps

  • Controlling how Xcode builds source code into executables

  • Analyzing processor and memory usage with Instruments

  • Integrating with Mavericks Server’s sleek continuous integration system

  • Register your book at www.informit.com/register for access to this title’s downloadable code.

    Table of Contents

    1. Title Page
    2. Copyright Page
    3. Dedication Page
    4. Contents at a Glance
    5. Contents
    6. Acknowledgments
    7. About the Author
    8. Introduction
      1. How This Book Is Organized
      2. About Versions
      3. About the Code
      4. Conventions
    9. Part I: First Steps
      1. 1. Getting Xcode
        1. Before You Begin
        2. Installing Xcode
        3. Removing Xcode
        4. Apple Developer Programs
        5. Downloading Xcode
        6. Additional Downloads
        7. Summary
      2. 2. Kicking the Tires
        1. Starting Xcode
        2. Hello World
        3. Getting Rid of It
        4. Summary
      3. 3. Simple Workflow and Passive Debugging
        1. Creating the Project
        2. Building
        3. Running
        4. Simple Debugging
        5. Summary
      4. 4. Active Debugging
        1. A Simple Test Case
        2. Going Active
        3. Fixing the Problem
        4. Summary
      5. 5. Compilation
        1. Compiling
        2. Linking
        3. Dynamic Loading
        4. Xcode and Clang
        5. Compiler Products
        6. Summary
      6. 6. Adding a Library Target
        1. Adding a Target
        2. Target Membership
        3. A Dependent Target
        4. Summary
      7. 7. Version Control
        1. Taking Control
        2. The State of Your Files
        3. Your First Commit
        4. Working with Remote Repositories
        5. Merges and Conflicts
        6. The Version Editor
        7. Branching
        8. Summary
    10. Part II: The Life Cycle of an iOS Application
      1. 8. Starting an iOS Application
        1. Planning the App
        2. Starting a New iOS Project
        3. What’s in the Project
        4. One More Thing
        5. Summary
      2. 9. An iOS Application: Model
        1. Implementing the Model
        2. Managed-Object Classes
        3. Making the Model Easier to Debug
        4. Summary
      3. 10. An iOS Application: Controller
        1. Renaming Symbols
        2. Editing the View Controller
        3. Live Issues and Fix-it
        4. The Real Passer Rating
        5. Summary
      4. 11. Building a New View
        1. The Next View Controller
        2. Building a View
        3. The Table View
        4. Outlets
        5. Testing the Billboard View
        6. Summary
      5. 12. Autolayout in a New View
        1. Why Autolayout?
        2. The Player Billboard, Revisited
        3. The Label System
        4. Summary
      6. 13. Adding Table Cells
        1. The Game Table
        2. The Game Table: First Run
        3. A Custom Table Cell
        4. Adding Some Graphics
        5. Summary
      7. 14. Adding an Editor
        1. The Plan
        2. Adding a Modal Scene
        3. The Editor View Controllers
        4. Segues
        5. Summary
      8. 15. Unit Testing
        1. The Test Navigator
        2. Testing the CSV Reader
        3. Testing and the Debugger
        4. Application Tests
        5. TestKit Assertions
        6. Summary
      9. 16. Measurement and Analysis
        1. Speed
        2. Memory
        3. Summary
      10. 17. Provisioning
        1. Apple Developer Programs
        2. Provisioning for iOS
        3. The Capabilities Editor
        4. OS X Sandboxing
        5. Gatekeeper and Developer ID
        6. Distribution Builds
        7. Summary
    11. Part III: Xcode for Mac OS X
      1. 18. Starting an OS X Application
        1. The Goal
        2. Getting Started
        3. Model
        4. Wiring a Menu
        5. Summary
      2. 19. Bindings: Wiring an OS X Application
        1. Laying out the Document Window
        2. Filling the Table—Bindings
        3. Layering NSControllers
        4. Running a Popover with Bindings
        5. Running the Near-Final App
        6. Summary
      3. 20. A Custom View for OS X
        1. A Graphing View
        2. Back to the View Controller
        3. QuickLook in the Debugger
        4. Custom View Properties
        5. Summary
      4. 21. Localization
        1. How Localization Works
        2. Adding a Localization
        3. Localizing MainMenu.xib
        4. Localizing Info.plist
        5. Strings in Code
        6. Showing Mac Passer Rating in Finder
        7. Summary
      5. 22. Bundles and Packages
        1. A Simple Package: RTFD
        2. Bundles
        3. Application Bundles
        4. The Info.plist File
        5. Info.plist Keys for Applications
        6. Info.plist
        7. Summary
      6. 23. Frameworks
        1. Adding a Framework Target
        2. Installing a Framework
        3. Building Mac Passer Rating
        4. Debugging a Framework
        5. Summary
      7. 24. Property Lists
        1. Property List Data Types
        2. Editing Property Lists
        3. Other Formats
        4. Specialized Property Lists
        5. Summary
    12. Part IV: Xcode Tasks
      1. 25. Documentation in Xcode
        1. Quick Help
        2. Open Quickly
        3. Help
        4. The Documentation Window
        5. Keeping Current
        6. Your Own Quick Help
        7. Your Own Docsets
        8. Summary
      2. 26. The Xcode Build System
        1. How Xcode Structures a Build
        2. Build Variables
        3. Settings Hierarchy
        4. Editing Build Variables
        5. Configurations
        6. Configuration Files
        7. Command-Line Tools
        8. Custom Build Rules
        9. The Build Log
        10. A Simple Build Transcript
        11. Summary
      3. 27. Instruments
        1. What Instruments is
        2. Running Instruments
        3. The Instruments
        4. Custom Instruments
        5. The Templates
        6. Summary
      4. 28. Debugging
        1. Scheme Options
        2. Doing More with Breakpoints
        3. The lldb Command Line
        4. Tips
        5. Summary
      5. 29. Continuous Integration
        1. Xcode Server
        2. Bots
        3. Seeing the Results
        4. Building for Distribution
        5. Summary
      6. 30. Snippets
        1. Tricks
        2. Traps
    13. Part V: Appendixes
      1. A. Some Build Variables
        1. Useful Build Variables
        2. Environment
        3. Code Signing
        4. Locations
        5. Compiler Settings
        6. Search Paths
        7. Info.plist
        8. The DEVELOPER Variables
        9. Source Trees
      2. B. Resources
        1. Books
        2. On the Net
        3. Face to Face
        4. Other Software