You are previewing Beginning iOS Programming For Dummies.
O'Reilly logo
Beginning iOS Programming For Dummies

Book Description

The ultimate beginner's guide to programming in the iOS environment

The Apple App Store is a gold mine for developers, but with more apps for the iPhone, iPad, and iPod touch being added every day, it s essential to have a solid programming foundation to create the best apps possible. If you're eager to learn the ins and outs of iOS programming, this is your book. It teaches object-oriented programming within the iOS framework from the ground up, preparing you to create the next super iPhone or iPad app.

Get a handle on the iOS framework, object-oriented best practices, and the Xcode programming environment, then discover how to create simple interfaces, use libraries, create and extend objects, and more. Whether you're just starting out in programming or only new to iOS, For Dummies is the perfect beginning.

  • Focuses on teaching object-oriented programming within the iOS framework and includes best practices for building apps that are easy to debug, evolve, and maintain

  • Uses simple examples to demonstrate object-oriented programming output in the iPhone environment while teaching real-world programming concepts and applications

  • Provides a thorough understanding of the framework and object-oriented principles to help beginning programmers make optimum use of iOS

  • Covers working with the Xcode environment and storyboards; creating simple interfaces; using libraries, functions, structures, arrays, and pointers; and creating and extending objects

  • Beginning iOS Programming For Dummies is your straightforward guide to getting started with iOS programming.

    Table of Contents

      1. Introduction
        1. About This Book
        2. Foolish Assumptions
        3. Icons Used in This Book
        4. Beyond the Book
      2. Part I: Getting Started with iOS Programming
      3. Chapter 1: Entering Mobile Application Development
        1. Apps for a Mobile Platform
        2. iOS Benefits
        3. iOS App Development Essentials
          1. Devices
          2. Application development technologies
          3. Xcode
        4. The Application Model
          1. Understanding the lifecycle of an iOS app
          2. Understanding the structure of an iOS app
        5. Object-Orientation Concepts
      4. Chapter 2: Object-Oriented Design Principles
        1. Basic Object-Oriented Concepts
          1. Designing programs
          2. Structural and behavioral concepts in OO
        2. Principles of Object-Orientation
          1. Coupling
          2. Cohesion
        3. Designing an Object-Oriented Application
        4. Advanced OO Techniques
          1. Delayed binding
          2. Delegation
          3. Design patterns
          4. Inversion of control and software frameworks
        5. The Application Development Lifecycle
          1. Software development lifecycle processes
          2. The phases and stages of a software development lifecycle (SDLC)
          3. The guiding principles of SDLC methodologies
          4. Customizing an SDLC methodology
      5. Chapter 3: Effectively Using Objective-C
        1. Examining an Objective-C Program
        2. Defining Classes
          1. Declaring instance variables
          2. Declaring methods
          3. Using forward references
          4. Implementing classes
        3. Using Classes, Objects, Methods, and Variables
          1. Invoking methods
          2. Creating objects
          3. Using all the language features
          4. Using introspection and dynamic invocation
        4. Managing Memory
        5. Handling Exceptions
        6. Organizing Program Files
        7. Analyzing Objective-C’s Object-Orientation Capabilities
      6. Part II: Meeting the Methods and Platforms
      7. Chapter 4: Patterns and Frameworks
        1. Common Patterns of OO Design
          1. Seeing basic design patterns
          2. Understanding the Model-View-Controller
          3. Making model objects persistent
          4. Avoiding anti-patterns
          5. Applying patterns to application design
        2. Understanding Frameworks
          1. Inversion of control
          2. Basic concepts
          3. Flow of control
      8. Chapter 5: Setting Up to Develop iOS Apps
        1. Becoming an iOS Developer
        2. Installing, Verifying, and Understanding the Xcode Development Environment
          1. Installing Xcode
          2. Verifying the development environment
          3. Understanding the elements of an Xcode workspace
        3. Importing and Running the Tic-Tac-Toe Sample Program
          1. Importing Tic-Tac-Toe and running it on the simulator
          2. Deploying an App on an iOS device
      9. Chapter 6: Developing an App on iOS
        1. Dissecting an iOS App
        2. Understanding an App’s Lifecycle
        3. Interacting with the App Through Its User Interface
        4. Dealing with Data
          1. Using JSON
          2. Saving data using files
          3. Moving up to Core Data
          4. Accessing the Address Book
          5. Setting options for your app
          6. Sharing data across apps
        5. Using Other iOS Capabilities on a Device
        6. Visiting the App Templates in Xcode
        7. Deconstructing the iOS Framework Using OO Principles and Design Patterns
          1. Seeing object-oriented concepts and techniques in iOS
          2. Seeing patterns in iOS
          3. Critiquing the iOS framework from the perspective of OO principles
      10. Chapter 7: Illustrating Object-Oriented iOS App Design
        1. Customizing an SDLC for iOS App Development
        2. Developing Use Cases
        3. Creating the User Interface
        4. Illustrating Object-Oriented Design
          1. Classes and responsibilities
        5. Collaborators and missing classes and responsibilities
        6. Contracts and signatures
        7. Implementing an Object-Oriented Design on iOS
          1. Implementing the model
          2. Creating storyboards and views
          3. Making the app active
        8. Analyzing the OO and Design Principles Used in Tic-Tac-Toe
          1. Use of design patterns in Tic-Tac-Toe
          2. Other concepts
      11. Part III: Making Your iOS Apps Fit for Consumption
      12. Chapter 8: Effectively Using Xcode
        1. Xcode and IOS — A Beautiful Friendship
          1. Setting up your app’s project
          2. Creating your app’s screen flow
          3. Writing your app’s code
          4. Managing and maintaining your app’s components
        2. Fine-Tuning Your App in Xcode
          1. Configuring your app
          2. Digging into the Simulator
          3. Exploring your iOS device from Xcode
          4. Debugging your app
          5. Using instruments to collect data
        3. Getting Help
      13. Chapter 9: Developing Your App’s User Interface
        1. Understanding How User Interfaces Work in iOS
          1. Comprehending event-driven programming in iOS
          2. Understanding the Application and the Application Delegate objects in UI processing
        2. Revisiting the Model-View-Controller Design Pattern
        3. Understanding the UI Components Available in iOS
          1. Interacting with buttons, text fields, and labels
          2. Alerting the user
          3. Selecting items using pickers
          4. Showing columnar data using a Table view
          5. Going through the other views in the iOS framework
          6. Navigating through a stack of screens using a Navigation controller
          7. Drawing using 2-D Graphics
      14. Chapter 10: Making Applications Fast and Responsive
        1. Becoming Familiar with Nonfunctional Requirements
        2. Designing Your App at Multiple Levels
        3. Optimizing an Application's Performance
        4. Using Instrumentation for Code Optimization
        5. Ensuring Responsiveness in Your Apps
          1. Ensuring responsiveness by using threading
        6. Other Performance Considerations for iOS Apps
      15. Chapter 11: Making Your App Reliable and Secure
        1. Making Your App Reliable Through Testing
          1. Understanding the fundamentals and levels of testing
          2. Understanding the levels of testing
          3. Using automated testing
        2. Adapting to Changes in the App’s Environment
          1. Implementing reliability while navigating your app’s lifecycle
          2. Dealing with missing or transient capabilities
        3. Considering Security in an iOS App
          1. Recognizing the importance of security
          2. Looking at security holistically
          3. Understanding the attack surface and developing a threat model for an app
          4. Implementing authentication and access control
          5. Protecting core data files with encryption
          6. Adding auditing to your application
      16. Part IV: Connecting Your Apps
      17. Chapter 12: Channeling the World Into Your Device
        1. Networking Basics
          1. Launching a browser from your app
          2. Embedding a browser in your iOS application using WebView
        2. Using Maps and Providing Location-Based Services
          1. Installing the additional development components needed for maps
          2. Displaying a map using a MapView
          3. Using geocoding to navigate the map
          4. Wherever you go, there you are
        3. Design Principles for Web- and Location-Based Apps
          1. Being nice about using remote services
          2. Using threading to deal with slow network connections
      18. Chapter 13: Harnessing iOS Device Capabilities
        1. Integrating E-Mail, SMS, and the Phone into Your App
          1. Sending e-mail from your app
          2. Sending an SMS from your app
          3. Placing telephone calls from your app
        2. Playing and Capturing Audio, Video, and Images
          1. Playing and recording video
          2. Playing and recording audio
          3. Working with images
        3. Seeing the Capabilities Available on Your Device
          1. Testing for network availability
          2. Testing for sound and camera capabilities
          3. Declaring an app's needs in the .plist file
        4. Bringing in the Outside World with Sensors
          1. Sensing orientation
          2. Sensing the accelerometer, gyroscope, and magnetometer
        5. Examining OO and Other Design Principles in this Chapter
          1. Seeing uses of loose coupling
          2. Using delegation for customized processing
          3. Using design patterns
          4. Design tradeoffs in Tic-Tac-Toe
      19. Chapter 14: Publishing to the App Store
        1. Creating Your Developer Account
        2. Distributing Applications
          1. Providing basic application details
          2. Special capabilities
          3. Internationalization and localization
        3. Testing
          1. iOS devices
          2. Beta testing
        4. Submitting Your App
          1. Using iTunes Connect
          2. Uploading to the App Store
        5. Supporting Your App
          1. Marketing
          2. Sales data and customer feedback
          3. Publishing updates
      20. Part V: The Part of Tens
      21. Chapter 15: Ten Resources for Object-Oriented Development
        1. Design Patterns: Elements of Reusable Object-Oriented Software
        3. Object-Oriented Programming with Objective-C
        4. The Journal of Object Technology
        5. Massively Open Online Courses (MOOCs)
        6. Ambysoft
        7. Craig Larman's Use Case Primer
        9. Agile Alliance
        10. Rajiv's YouTube Video Series
      22. Chapter 16: Ten Developer Resources for iOS
        1. iOS Dev Center
        2. Apple Worldwide Developers Conference
        3. iOS Dev Weekly
        4. raywenderlich
        5. AppCoda
        6. Stack Overflow
        7. iPhoneDevSDK
        8. pttrns
        9. Cocoa Controls
        10. MacRumors
      23. About the Author
      24. Cheat Sheet
      25. More Dummies Products