Learn Xcode Tools for Mac OS X and iPhone Development

von: Ian Piper

Apress, 2010

ISBN: 9781430272205 , 450 Seiten

Format: PDF, OL

Kopierschutz: DRM

Windows PC,Mac OSX für alle DRM-fähigen eReader Apple iPad, Android Tablet PC's Online-Lesen für: Windows PC,Mac OSX,Linux

Preis: 46,99 EUR

  • Automatic Digital Document Processing and Management - Problems, Algorithms and Techniques
    Designing Interfaces in Public Settings - Understanding the Role of the Spectator in Human-Computer Interaction
    Spyware and Adware
    Handbook of Cloud Computing
    Open Networked 'i-Learning' - Models and Cases of 'Next-Gen' Learning
    Evolving Towards the Internetworked Enterprise - Technological and Organizational Perspectives
  • R-Trees: Theory and Applications
    Cooperative Work and Coordinative Practices - Contributions to the Conceptual Foundations of Computer-Supported Cooperative Work (CSCW)
    The Engineering of Mixed Reality Systems
    Guide to OCR for Indic Scripts - Document Recognition and Retrieval
    Research and Development in Intelligent Systems XXVI - Incorporating Applications and Innovations in Intelligent Systems XVII
    Sketch-based Interfaces and Modeling
 

Mehr zum Inhalt

Learn Xcode Tools for Mac OS X and iPhone Development


 

Contents at a Glance

5

Table of contents

6

About the Author

11

About the Technical Reviewer

12

Acknowledgments

13

Preface

14

Chapter 1 Introducing Xcode Tools for Mac OS X and the iPhone

15

Software Development Choices for the Mac Programmer

15

Why You Should Develop Using Xcode Tools

16

Xcode, Cocoa, and Objective-C

17

The Apple Xcode Developer Tools Family

18

What You’ll Find in This Book

19

Part 1

19

Part 2

19

Part 3

19

What You Won’t Find in This Book

20

Summary

20

Chapter 2 Introducing the Xcode Workspace

22

Getting and Installing Xcode Developer Tools

22

Getting Xcode

22

Installing Xcode

23

Installation Location

23

Custom Installation Options

24

What the Installation Added

25

Removing Your Xcode Developer Tools Installation

25

Getting to Know the Xcode Workspace

25

The Welcome to Xcode Window

26

The Xcode Clean Screen View

26

Starting a New Project

27

The Xcode Workspace Working Environment

30

Groups & Files List

30

Find Results

31

Bookmarks

31

SCM

31

Implementation Files and NIB Files

31

Detail View

32

Editor View

33

Toolbar

34

Favorites Bar

38

Status Bar

38

It’s All Gone Horribly Wrong

39

Xcode Workspace Preferences

39

General

39

Code Sense

40

Building

40

Distributed Builds

40

Debugging

41

Key Bindings

41

Text Editing, Fonts & Colors, and Indentation

41

File Types

41

Source Trees

41

SCM

41

Documentation

42

Summary

43

Chapter 3 Interface Builder

44

Professional User Interface Design—and More—for Your Xcode Projects

44

Getting to Know the Interface Builder Environment

45

Adding Some Controls to Your User Interface

46

Positioning and Aligning Controls and Windows

47

Autosizing Controls

49

The Library in More Depth

54

Library Window Layout

54

Customizing the Layout

54

Connecting the Pieces

55

The Documents Window

55

The Inevitable Hello World Program

56

Incremental Development—Adding Features to Your HelloWorld Program

62

Creating a Document-Based Application

64

Implementing File Saving and Reading

66

A Little Polish

70

Summary

72

Chapter 4 Core iPhone Tools

73

First Things First: What You Need to Develop iPhone Software

73

Getting and Installing the SDK

74

Writing a Simple iPhone Application

75

Just One More Thing

88

Summary

89

Chapter 5 Frameworks in Xcode

90

A Short Tour of the Frameworks

90

What Are the Frameworks?

91

Location of the Frameworks

91

Other Frameworks

92

Where to Look for More Information

92

Using Frameworks in Applications

92

The WebKit Framework—Create Your Own Web Browser

92

The Core Data Framework—Building a Simple Database Application

97

A Potential Gotcha

107

Choosing a Data Store

107

The ScreenSaver Framework

108

Summary

118

Chapter 6 Model-View-Controller in Xcode

119

Understanding MVC

119

The Simplest Example

120

A More Complex Example

122

Summary

127

Chapter 7 Debugging Your Xcode Projects

128

The Debugger and Console Views

128

Creating a Project to Debug

129

Running and Debugging the Project

133

Syntax Errors

133

Debugging with Breakpoints

134

Using NSLog to Track Changing Properties

140

Checking Syntax in the Documentation

140

Exploring the Debugger

142

Debugging Features in the Code Editor

143

The Main Debugger Window

143

The Mini Debugger

145

Summary

147

Chapter 8 Xcode Documentation

148

Overview of Documentation Resources for Xcode

148

Quick Help

148

ADC Documentation

150

Cocoa Fundamentals Guide

151

Xcode Workflow and Cocoa Application Tutorials

152

Recommended Reading for Xcode Developers

152

Getting Around the ADC Documentation

153

Other Resources on the Apple Developer Site

156

Third-Party Online Resources

156

Other Sources of Information

157

Keeping a High Signal-to-Noise Ratio

157

Mailing Lists and Web Forums

158

RSS Feeds

158

Creating Your Own Developer Documentation

158

Downloading and Installing Doxygen

159

Overview of Documentation Creation with Doxygen

159

Commenting the Code

159

Creating Documentation for TemperatureConverter

161

Converting the HTML into a Docset

163

Advanced Doxygen Topics

166

Summary

167

Chapter 9 Developing an Application

168

Defining the Problem

168

Designing the Application

169

Sketching Out the Problem Space

170

The Data Model

171

Creating the Project

173

Choosing the Data Store Format

174

Building the User Interfaces

175

The Core Data Entity Interface Assistant

175

Developing the User Interface

177

Tidying Up and Adding the Extra Buttons

181

Creating the Secondary Windows

183

Configuring the Search Capabilities

185

Running the Application

186

What to Do if It Doesn’t Work

187

Making Improvements

187

Displaying the Full Name in One Field

187

Displaying the Total Amount Earned Across the Journal Entries

191

Where to Take the Application from Here

192

Looking Back and Looking Forward

193

Chapter 10 Source-Code Management with Subversion

195

Introduction to Subversion

196

The Subversion Work Cycle

197

One Repository or Many?

198

Using a Single Repository

198

Using Individual Repositories

199

Where to Get More Information

199

Installing a Local Subversion Server

200

Creating a Repository

200

Configuring the Repository in Xcode

203

Populating the Repository with Projects

204

Getting a Working Copy out of the Repository

206

Making Changes and Committing Code

208

Comparing Revisions and Rolling Back

209

Handling Version Conflicts

210

Using an Online Subversion Server

212

Summary

213

Chapter 11 Unit Testing in Xcode

215

Introducing Unit Testing

215

Unit Testing in Practice

217

Setting Up a Project for Unit Testing

218

Writing Unit Tests

220

Running Your First Unit Test

221

What Should You Test?

225

Rightness

225

Wrong Input

225

Boundary Conditions

226

Other Factors to Test

227

Making Your Test Suite More Efficient

228

Where to Go Next

229

Dependent versus Independent Unit Testing

230

Summary

232

Chapter 12 Monitoring, Analysis, and Performance Tools

233

Instruments

233

Tracking Down a Memory Leak

233

Create the Application

234

Building the Interface

235

Monitoring the Application in Instruments

236

Analyzing the Memory Leaks

238

Tracking File Activity

240

Activity Monitor

242

What Else Can You Do with Instruments?

243

Shark

244

BigTop

248

Spin Control

250

Summary

252

Chapter 13 Support Tools for the Busy Developer

254

Icon Composer

254

Creating the Basic Image for an Application Icon

255

Creating the Icon in Icon Composer

256

Pixie

261

FileMerge

263

Property List Editor

266

Adding Help Functionality

268

Help in Xcode-based Applications

268

Creating the XHTML Pages

268

Adding Meta Tags to the Welcome Page

269

Running the Help Indexer

270

Adding and Configuring the Help Files Within the Xcode Project

271

Testing the New Help Function

272

Adding a Help Button Linked to a Help Page

273

Summary

276

Chapter 14 Usability and Accessibility

277

Overview of Usability

278

Consistency

278

Affordance

279

Mental Model

279

Usability Considerations for Mac OS X

280

Program Design Considerations for Good Usability

280

Autosizing and Auto-Positioning

281

Consistent Visual Design

281

Affordance Revisited

282

Tab Order

284

Special Usability Considerations for iPhone Program Design

285

Form Factor

285

Only One Window

285

One Only Application

285

Direct-Manipulation Interface

285

Gesture-Driven Interface

286

Accessibility in Mac OS X

286

Accessibility Considerations

287

Display Factors

287

Keyboard Operation

287

Testing Accessibility in Your Software

288

VoiceOver

291

Summary

294

Chapter 15 Packaging and Distribution

295

Build Configurations—From Debug to Release

295

Using a Disk Image

296

PackageMaker

301

What’s in Store

301

Creating an Installation Package with PackageMaker

301

Starting PackageMaker

301

Adding Content

302

Package Content Configuration

303

Package Content Ownership

304

Offering Choices for Custom Installations

305

Package-Level Configuration

306

Polishing the Interface

308

Building the Package

310

Testing the Installation Package

310

Distributing your iPhone Application

311

Summary

319

Preparation Steps

312

Information Gathering

313

Registration and Information Generation

315

Checking That It All Works

317

Ad Hoc Distribution

318

Index

320