You are previewing Beginning Xcode: Swift Edition.
O'Reilly logo
Beginning Xcode: Swift Edition

Book Description

Beginning Xcode, Swift Edition will not only get you up and running with Apple's latest version of Xcode, but it also shows you how to use Swift in Xcode and includes a variety of projects to build.

If you already have some programming experience with iOS SDK and Objective-C, but want a more in-depth tutorial on Xcode, especially Xcode with Apple’s new programming language, Swift, then Beginning Xcode, Swift Edition is for you. The book focuses on the new technologies, tools and features that Apple has bundled into the new Xcode 6, to complement the latest iOS 8 SDK.

By the end of this book, you'll have all of the skills and a variety of examples to draft from to get your Swift app from idea to App Store with all the power of Xcode.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. About the Technical Reviewer
  9. Acknowledgments
  10. Introduction
  11. Part I: Getting Acquainted
    1. Chapter 1: Welcome to Xcode
      1. What Is Xcode?
      2. What Is Swift?
      3. Why Choose Xcode?
      4. Prior Assumptions
      5. What’s Covered in This Book
        1. Part 1: Getting Acquainted
        2. Part 2: Diving Deeper
        3. Part 3: Final Preparations and Releasing
      6. Getting and Installing Xcode
      7. Firing Up Xcode
      8. Apple’s Resources for Developers
      9. The Dev Center
      10. Your Developer Account
      11. Source Code
      12. Additional Resources
      13. Summary
    2. Chapter 2: Diving Right In
      1. Creating Your First Xcode Project
      2. The Project
      3. Designing the Interface
      4. Making Connections
      5. Running and Testing
      6. Adding Files
      7. Organizing Files in Xcode
      8. Summary
    3. Chapter 3: Project Templates and Getting Around
      1. Project Templates
        1. Master Detail View
        2. Page-Based Applications
        3. Single View Applications
        4. Tabbed Applications
        5. Games
      2. Template Selection
      3. Getting Around
        1. Navigators
        2. Toolbar
        3. Editor
        4. Utilities
        5. Configuring the Second View Controller
        6. Debugging Area
      4. Summary
    4. Chapter 4: Building Interfaces
      1. Getting Ready
      2. Adding Tab Bar Icons to an Asset Catalog
      3. Before You Start ...
      4. Building the Interface
        1. Setting the Tab Icons
        2. Tracking Location with the Track It Tab
        3. Mixing Colors with the Slide It Tab
        4. Adding “Off the Menu” Controls
        5. Changing the Interface with Code
      5. Summary
    5. Chapter 5: Getting Help and Code Completion
      1. Getting Help
        1. Creating the Project
        2. Downloading Additional Documentation
        3. Quick Help
        4. Documentation Viewer
      2. Apple’s Web Site
      3. Code Completion
        1. Opening Web Sites in Safari
        2. Sending an E-mail with MFMailComposeViewController
        3. Sending a Text Message
        4. Building the Interface
        5. Running the Application
      4. Summary
    6. Chapter 6: Constraints
      1. Understanding Auto Layout
      2. Building an Authentication View
        1. Design Considerations
      3. Debugging Views in Xcode
        1. Manually Adding Constraints
        2. Automatically Adding Constraints
      4. Previewing Your Layout
      5. Size Classes
      6. Finishing Touches
        1. Customizing Text Fields
      7. Summary
  12. Part II: Diving Deeper
    1. Chapter 7: Storyboards
      1. A Brief History of Storyboards
      2. Creating a New Project Called SocialApp
        1. Creating View Controllers
        2. Pairing the View to the Controller
      3. Building Up the Storyboard
      4. Linking Scenes and Building Interfaces
        1. What Are Segues?
        2. Adding a Navigation Controller
        3. Creating an Interface for the Feed View Controller
        4. Creating an Interface for Tweet View Controller
        5. Creating an Interface for the Compose View Controller
      5. Summary
    2. Chapter 8: Table and Collection Views
      1. What Is a Table View?
        1. Table View Composition
        2. Table View Styles
      2. Configuring the Accounts View
        1. The Key Attributes of Table Views
        2. Manipulating Static Table Views
        3. The Accounts and Social Framework
        4. Retrieving and Displaying Twitter Accounts
      3. Configuring the Feed View
      4. Configuring the Tweet View
      5. Configuring the Compose View
      6. Discovering the Collection View
        1. Embedding a Tab Bar Controller
        2. Persisting User Preferences with NSUserDefaults
      7. Adding a Collection View Controller
        1. Configuring a Collection View
        2. Displaying Items in a Collection View
      8. Summary
    3. Chapter 9: Frameworks, Libraries, and Targets
      1. Understanding Frameworks
        1. Creating the Project
      2. Static Libraries, Frameworks, and Swift
      3. Working with Multiple Targets
      4. Summary
    4. Chapter 10: Advanced Editing
      1. Getting Started
      2. Efficient Editing
        1. Changing Color Schemes
        2. Organizing and Navigating Code
        3. Building the Scene
        4. Folding Code
        5. The Code Snippet Library
      3. Summary
    5. Chapter 11: Debugging and Analysis
      1. Building the Application
      2. Using Breakpoints to Resolve Logical Errors
        1. Setting a Breakpoint
        2. The Debug Navigator
        3. The Debug Area
        4. The Breakpoint Navigator
      3. Runtime Errors
        1. Using Exception Breakpoints
      4. Compile-Time Errors
        1. The Issue Navigator
      5. Tools to Help with Debugging
        1. Debugging a Location
        2. Print Debugging with the Printer Simulator
      6. Playground
      7. Summary
  13. Part III: Final Preparations and Releasing
    1. Chapter 12: Version Control with Git
      1. Why Use Version Control?
        1. What Is Git?
      2. Creating the Project
        1. The AVFoundation Framework
        2. Creating the Interface
      3. Committing Changes
        1. Examining Changes with the Version Editor
      4. Branching in a Repository
        1. Merging Branches
        2. Removing a Branch
      5. Using a Remote Repository
        1. Registering for GitHub and Creating a Repository
        2. Adding a GitHub Repository to Xcode
        3. Pushing to a Remote Repository
        4. Updating the Remote Repository
      6. Summary
    2. Chapter 13: Localization
      1. Creating the SayMyName Application
        1. Adding the Resources
      2. Creating the Application Interface
        1. Laying Out the Views
        2. Building the Interface
      3. Writing the Code for the SayMyName Application
        1. Retrieving a Contact from the Address Book
        2. Converting Text to Speech
      4. Localizing the Application
        1. Enabling Localization
        2. Adding Another Language
        3. Storyboards and Localization
        4. Localizing Images
        5. Localizing Code with Localizable.strings
      5. Testing Localizations
        1. Testing Localization with Xcode 6
        2. Testing Localization in the Simulator
        3. Setting the Application Language in the Scheme
      6. Summary
    3. Chapter 14: Devices and the Organizer
      1. The Role of the Organizer in Xcode 6
      2. Preparing Xcode for Deploying to a Device
        1. Enrolling in the iOS Developer Program
        2. Adding Your Developer Account to Xcode
      3. Preparing a Device for Deployment
      4. Managing Devices in Xcode
        1. Capturing a Screenshot from a Running Application
      5. The Projects Organizer
        1. Using the Project and Workspace List
        2. Using Snapshots
      6. The Archives Organizer
        1. Archiving Your Application
      7. Summary
    4. Chapter 15: Building, Sharing, and Distributing Applications
      1. Final Checks Before Publishing Your Application
      2. Building a Launch Screen
      3. Discovering iTunes Connect
        1. Creating an App ID
        2. Creating an Application Profile
      4. Uploading an Application to iTunes Connect
        1. Creating a Distribution Certificate and Profile
        2. Validating Your Application
      5. Submitting Your Application to the App Store
        1. Submitting Applications Using the Archives Organizer
      6. Submitting Applications Using the Application Loader
        1. Changing Build Numbers
        2. Creating an .ipa File
      7. Submitting an Application for Approval
      8. Using the iTunes Connect App
      9. Summary
      10. Next Steps
  14. Index