You are previewing Building iPhone OS Accessories: Use the iPhone Accessories API to Control and Monitor Devices.
O'Reilly logo
Building iPhone OS Accessories: Use the iPhone Accessories API to Control and Monitor Devices

Book Description

This book provides a serious, in-depth look at Apple's External Accessory Framework and the iPhone Accessories API. You'll learn how to create new, integrated solutions that combine iPhone apps with dedicated hardware.

The iPhone OS Accessories API expands the opportunities for innovative iPhone developers, allowing you to control and monitor external devices, whether you've built them yourself or obtained them from a third party.

Table of Contents

  1. Copyright
  2. About the Author
  3. About the Technical Reviewer
  4. Preface
  5. I. What is an Accessory?
    1. 1. Accessory Overview
      1. 1.1. Being Different
      2. 1.2. Accessories
      3. 1.3. Uses of Accessories
      4. 1.4. Accessories: A View From Above
      5. 1.5. Credit Card Reader
      6. 1.6. But I'm a Programmer
      7. 1.7. The Software Approach
      8. 1.8. The Pong Game
      9. 1.9. Embedded Systems
      10. 1.10. Building an Accessory
      11. 1.11. Summary
    2. 2. EAAccessory Framework
      1. 2.1. Frameworks
      2. 2.2. Streams
      3. 2.3. Protocols
      4. 2.4. More on Protocols
      5. 2.5. The EA Framework
        1. 2.5.1. EAAccessory Class Properties
        2. 2.5.2. EAAccessory Class Constants
        3. 2.5.3. EAAccessoryManager Class
          1. 2.5.3.1. Shared Accessory Manager
          2. 2.5.3.2. Accessory Manager Notification
          3. 2.5.3.3. Available Accessories from Accessory Manager
        4. 2.5.4. EASession
          1. 2.5.4.1. Streams
      6. 2.6. Summary
    3. 3. EA Framework Design Patterns
      1. 3.1. Object-Oriented Programming
        1. 3.1.1. The Basics of OOP
        2. 3.1.2. The UIApplication Class
      2. 3.2. Delegation
      3. 3.3. OOP and Delegation
      4. 3.4. Model-View-Controller
      5. 3.5. Notification
      6. 3.6. EA Pattern
      7. 3.7. Summary
  6. II. Project Walkthrough
    1. 4. The Game Controller
      1. 4.1. The Griffin iTrip
        1. 4.1.1. iTrip Dissected
      2. 4.2. Game Controller Design
        1. 4.2.1. The Game Controller's Functions
          1. 4.2.1.1. The Potentiometer for Paddle Movement
          2. 4.2.1.2. The Pushbutton to Serve
      3. 4.3. Electrical and Physical Design
      4. 4.4. Test Software
      5. 4.5. Summary
    2. 5. Specifying a Pong Game
      1. 5.1. Keeping It Simple
      2. 5.2. Specification
        1. 5.2.1. Page One—Drawings
        2. 5.2.2. Developing Your Requirements
      3. 5.3. Summary
    3. 6. Coding a Pong Game
      1. 6.1. Architecture
        1. 6.1.1. The Application Life Cycle
        2. 6.1.2. Pong Game Architecture
        3. 6.1.3. The Application Delegate
        4. 6.1.4. The View Controller
        5. 6.1.5. The Nib
      2. 6.2. Summary
    4. 7. Adding the Game Controller
      1. 7.1. The Game Controller Test Program
      2. 7.2. The Game Controller Object
        1. 7.2.1. The Game Controller Interface
        2. 7.2.2. The Game Controller Implementation
        3. 7.2.3. View Controller Modifications
      3. 7.3. Summary
    5. 8. Improving the Design
      1. 8.1. Performance Concerns
      2. 8.2. Security Concerns
        1. 8.2.1. The Payment Card Industry
        2. 8.2.2. Code Changes
          1. 8.2.2.1. Step 1
          2. 8.2.2.2. Step 2
          3. 8.2.2.3. Step 3
          4. 8.2.2.4. Step 4
          5. 8.2.2.5. Step 5
      3. 8.3. Summary
    6. 9. Apple Developer Programs
      1. 9.1. Mac Developer
      2. 9.2. iPhone Developer
      3. 9.3. Apple Developer Connection
      4. 9.4. Made For iPod/Works With iPhone
      5. 9.5. Running a Business
      6. 9.6. Summary
  7. III. Designing an Accessory
    1. 10. Hardware Design
      1. 10.1. Getting Started
      2. 10.2. Design Process
        1. 10.2.1. Parts (Processor) Selection
        2. 10.2.2. Prototyping
        3. 10.2.3. Circuit Design
        4. 10.2.4. PCB Design
        5. 10.2.5. Fabrication
        6. 10.2.6. Integration and Testing
      3. 10.3. Summary
    2. 11. Firmware
      1. 11.1. I'm a PC
      2. 11.2. Compilers
      3. 11.3. Programming
      4. 11.4. Debugging
      5. 11.5. Your PCB
      6. 11.6. Structure
      7. 11.7. Chip Configuration
      8. 11.8. Summary
    3. 12. Everything Else
      1. 12.1. Tools and Test Equipment
        1. 12.1.1. Tools
        2. 12.1.2. Test Equipment
      2. 12.2. Mechanical Design
        1. 12.2.1. The Alternative to Custom Mechanical Design
      3. 12.3. Packaging
      4. 12.4. Business Processes
      5. 12.5. Summary
    4. A. Appendix
      1. A.1. PongViewController.h interface listing
      2. A.2. PongViewController.m implementation listing
      3. A.3. GameController.h
      4. A.4. GameController.m
      5. A.5. pongViewController.h
      6. A.6. pongViewController.m
      7. A.7. pongAppDelegate.h
      8. A.8. pongAppDelegate.m
      9. A.9. GameController.h
      10. A.10. GameController.m
      11. A.11. pongViewController.h
      12. A.12. pongViewController.m