- ホーム
- > 洋書
- > 英文書
- > Computer / General
Full Description
Use Xcode 6 to Craft Outstanding iOS and OS X Apps!Xcode 6 Start to Finish will help you use Apple's Xcode 6 tools to improve productivity, write great code, and leverage the newest iOS 8 and OS X Yosemite features, including Apple's new Swift programming language.Drawing on more than thirty years of experience developing for Apple platforms, and helping others do so, Fritz Anderson presents a complete best-practice workflow that reflects Xcode's latest innovations. Through three full, sample projects, you'll learn to integrate testing, source control, and other key skills into a high-efficiency process that works. And all sample code has been completely written in Swift, with figures and descriptions that reflect Xcode's radically new interface.This is the only Xcode 6 book focused on deep mastery of the tools you'll be living with every day. Anderson reveals better ways to storyboard, instrument, build, and compile code, and helps you apply new features, ranging from Interface Builder Live Rendering to View Debugging and XCTest Performance Testing. By the time you're finished, you'll have all the Xcode 6 skills you need in order to develop truly exceptional software.Coverage includesWorking with iOS-side dynamic frameworks and iOS/OS X extension modules Streamlining Model, View, and Controller development with Swift Rewriting Objective-C functions in Swift Efficiently managing layouts and view hierarchies with size classes Inspecting and fixing interface issues with the new View Debugger Displaying and configuring custom views within Interface Builder via Live Rendering Benchmarking performance within the Xcode 6 unit test framework Leveraging Xcode 6 automated tools to simplify localization Creating new extensions to inject services and UI into other applications Mastering new Swift debugging techniquesRegister your book at informit.com/register for access to this title's downloadable code.
Contents
Acknowledgments xxiiiAbout the Author xxvIntroduction 1How This Book Is Organized 1About Versions 4About the Code 4Conventions 5Part I: First Steps 7Chapter 1: Getting Xcode 9Before You Begin 9Installing Xcode 10Removing Xcode 11Apple Developer Programs 12Downloading Xcode 13Additional Downloads 14Summary 15Chapter 2: Kicking the Tires 17Starting Xcode 17Hello World 19Getting Rid of It 24Summary 24Chapter 3: Simple Workflow and Passive Debugging 25Creating the Project 25Building 29Running 30Simple Debugging 32Summary 34Chapter 4: Active Debugging 35A Simple Test Case 35Going Active 35Fixing the Problem 39Summary 43Chapter 5: Compilation 45Compiling 45Dynamic Loading 52Xcode and Clang 52Swift 57Compiler Products 62Summary 66Chapter 6: Adding a Library Target 69Adding a Target 69Target Membership 71A Dependent Target 74Summary 77Chapter 7: Version Control 79Taking Control 80The State of Your Files 82Your First Commit 84Working with Remote Repositories 84Merges and Conflicts 89The Version Editor 99Branching 102Summary 104Part II: The Life Cycle of an iOS Application 105Chapter 8: Starting an iOS Application 107Planning the App 107Starting a New iOS Project 110What's in the Project 112Summary 114Chapter 9: An iOS Application: Model 117Implementing the Model 117Managed-Object Classes 123Preparation 128Specializing the Core Data Classes 132Making the Model Easier to Debug 139Summary 139Chapter 10: An iOS Application: Controller 141Renaming Symbols in Objective-C 141Renaming a Class in Swift 144Editing the View Controller 144Live Issues and Fix-it 148The Real Passer Rating 149Summary 155Chapter 11: Building a New View 157The Next View Controller 157Building a View 161The Table View 174Outlets 175Testing the Billboard View 183Summary 184Chapter 12: Auto Layout in a New View 185Why Auto Layout? 185The Player Billboard, Revisited 186Factoring Layout into Subviews 188Planning Constraints 197Two Line Counts, Two Labels 200Constraints for Real 202Summary 205Chapter 13: Adding Table Cells 207The Game Table 207The Game Table: First Run 211A Custom Table Cell 214Adding Some Graphics 217Summary 225Chapter 14: Adding an Editor 227The Plan 227Adding a Modal Scene 227The Editor View Controllers 233Segues 239Summary 240Chapter 15: Unit Testing 243The Test Navigator 244Testing the CSV Reader 246Testing and the Debugger 254Adding a Test Class 256Asynchronous Tests 260XCTest Assertions 261Summary 264Chapter 16: Measurement and Analysis 265Speed 265XCTest and Performance 276Memory 277Summary 278Chapter 17: An iOS Extension 279Adding the Today Target 280Designing the Widget 281A Shared Library in a Framework 285The Today Extension 290Build Dependencies 294The Result 295Summary 296Chapter 18: Provisioning 297Apple Developer Programs 297Provisioning for iOS 299The Capabilities Editor 306OS X Sandboxing 308Gatekeeper and Developer ID 311Distribution Builds 314Summary 318Part III: Xcode for Mac OS X 319Chapter 19: Starting an OS X Application 321The Goal 321Getting Started 322Model 325Wiring a Menu 330Summary 341Chapter 20: Bindings: Wiring an OS X Application 343Storyboard Segues in OS X 343Building the Document Window 345Filling the Table- Bindings 350The Arc of League Document Data 357Summary 371Chapter 21: Localization 373How Localization Works 373Adding a Localization 374Something Worth Localizing 376Localizing for French 382Localizing System Strings 398Summary 400Chapter 22: Bundles and Packages 401A Simple Package: RTFD 401Bundles 403Application Bundles 403The Info.plist File 405Info.plist Keys for Applications 406Summary 415Chapter 23: Property Lists 417Property List Data Types 417Editing Property Lists 419Other Formats 429Specialized Property Lists 431Summary 432Part IV: Xcode Tasks 433Chapter 24: Documentation in Xcode 435Quick Help 435Open Quickly 437Help 438The Documentation Window 439Keeping Current 444Your Own Quick Help 446Swift and reStructuredText 456Summary 458Chapter 25: The Xcode Build System 459How Xcode Structures a Build 459Build Variables 462Settings Hierarchy 463Editing Build Variables 465Configurations 466Configuration Files 468Command-Line Tools 471Custom Build Rules 474Builds in the Report Navigator 476A Simple Build Transcript 476Summary 487Chapter 26: Instruments 489What Instruments Is 489Running Instruments 490The Trace Document Window 492Tracing 500The Instruments 504Custom Instruments 511The Templates 512Summary 514Chapter 27: Debugging 515Scheme Options 515Doing More with Breakpoints 518View Hierarchy 521The lldb Command Line 523Tips 525Summary 528Chapter 28: Snippets 531Tricks 531Traps 541Part V: Appendixes 547Appendix A: Some Build Variables 549Useful Build Variables 550Source Trees 562Appendix B: Resources 565Books 565Books about Swift 566On the Net 567Face to Face 570Other Software 570Index 579



