Building iPhone OS Accessories - Use the iPhone Accessories API to Control and Monitor Devices

Building iPhone OS Accessories - Use the iPhone Accessories API to Control and Monitor Devices

by: Ken Maskrey

Apress, 2010

ISBN: 9781430229322 , 328 Pages

Format: PDF, Read online

Windows PC,Mac OSX Apple iPad, Android Tablet PC's Palm OS, PocketPC 2002 und älter, PocketPC 2003 und neuer, Windows Mobile Smartphone, Handys (mit Symbian) Read Online: Windows PC,Mac OSX,Linux

Price: 58,84 EUR

More eBook Details

Building iPhone OS Accessories - Use the iPhone Accessories API to Control and Monitor Devices


 

Title Page

1

Copyright Page

2

Contents at a Glance

4

Table of Contents

5

About the Author

9

About the Technical Reviewer

10

Preface

11

Part I What is an Accessory?

13

Chapter 1 Accessory Overview

14

Being Different

14

Accessories

15

Uses of Accessories

15

Accessories: A View From Above

17

Credit Card Reader

22

But I’m a Programmer

25

The Software Approach

26

The Pong Game

27

Embedded Systems

28

Building an Accessory

30

Summary

30

Chapter 2 EAAccessory Framework

32

Frameworks

32

Streams

33

Protocols

34

More on Protocols

37

The EA Framework

43

EAAccessory Class Properties

43

EAAccessory Class Constants

49

EAAccessoryManager Class

49

Shared Accessory Manager

49

Accessory Manager Notification

50

Available Accessories from Accessory Manager

51

EASession

52

Streams

54

Summary

56

Chapter 3 EA Framework Design Patterns

58

Object-Oriented Programming

58

The Basics of OOP

60

The UIApplication Class

65

Delegation

68

OOP and Delegation

72

Model-View-Controller

75

Notification

77

EA Pattern

83

Summary

84

Part II Project Walkthrough

87

Chapter 4 The Game Controller

88

The Griffin iTrip

88

iTrip Dissected

91

Game Controller Design

93

The Game Controller’s Functions

94

The Potentiometer for Paddle Movement

94

The Pushbutton to Serve

96

Electrical and Physical Design

97

Test Software

99

Summary

110

Chapter 5 Specifying a Pong Game

112

Keeping It Simple

112

Specification

112

Page One—Drawings

113

Developing Your Requirements

121

Summary

125

Chapter 6 Coding a Pong Game

127

Architecture

127

The Application Life Cycle

127

Pong Game Architecture

134

The Application Delegate

136

The View Controller

136

The Nib

138

Summary

146

Chapter 7 Adding the Game Controller

148

The Game Controller Test Program

148

The Game Controller Object

152

The Game Controller Interface

152

The Game Controller Implementation

153

View Controller Modifications

163

Summary

170

Chapter 8 Improving the Design

171

Performance Concerns

171

Security Concerns

174

The Payment Card Industry

175

Code Changes

180

Step 1

181

Step 2

181

Step 3

181

Step 4

181

Step 5

182

Summary

183

Chapter 9 Apple Developer Programs

184

Mac Developer

184

iPhone Developer

185

Apple Developer Connection

187

Made For iPod/Works With iPhone

188

Running a Business

188

Summary

195

Part III Designing an Accessory

196

Chapter 10 Hardware Design

197

Getting Started

197

Design Process

200

Parts (Processor) Selection

201

Prototyping

207

Circuit Design

209

PCB Design

214

Fabrication

217

Integration and Testing

219

Summary

223

Chapter 11 Firmware

224

I’m a PC

224

Compilers

225

Programming

226

Debugging

230

Your PCB

234

Structure

237

Chip Configuration

241

Summary

242

Chapter 12 Everything Else

243

Tools and Test Equipment

243

Tools

244

Test Equipment

249

Mechanical Design

251

The Alternative to Custom Mechanical Design

254

Packaging

255

Business Processes

257

Summary

259

Appendix

260

PongViewController.h interface listing

260

PongViewController.m implementation listing

262

GameController.h

269

GameController.m

270

pongViewController.h

274

pongViewController.m

276

pongAppDelegate.h

286

pongAppDelegate.m

287

GameController.h

287

GameController.m

288

pongViewController.h

292

pongViewController.m

294

Index

305