Acknowledgments |
|
xxiii | |
About the Author |
|
xxv | |
Introduction |
|
1 | (6) |
|
How This Book Is Organized |
|
|
1 | (3) |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
5 | (2) |
I First Steps |
|
7 | (98) |
|
|
9 | (8) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
13 | (1) |
|
|
14 | (1) |
|
|
15 | (2) |
|
|
17 | (8) |
|
|
17 | (2) |
|
|
19 | (5) |
|
|
19 | (3) |
|
|
22 | (1) |
|
|
22 | (2) |
|
|
24 | (1) |
|
|
24 | (1) |
|
|
24 | (1) |
|
3 Simple Workflow and Passive Debugging |
|
|
25 | (10) |
|
|
25 | (4) |
|
|
29 | (1) |
|
|
30 | (2) |
|
|
32 | (2) |
|
|
34 | (1) |
|
|
35 | (10) |
|
|
35 | (1) |
|
|
35 | (4) |
|
|
36 | (1) |
|
|
37 | (1) |
|
|
37 | (2) |
|
|
39 | (4) |
|
|
40 | (2) |
|
|
42 | (1) |
|
|
43 | (2) |
|
|
45 | (24) |
|
|
45 | (7) |
|
|
52 | (1) |
|
|
52 | (5) |
|
|
53 | (2) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
57 | (5) |
|
|
62 | (4) |
|
|
62 | (2) |
|
|
64 | (2) |
|
|
66 | (3) |
|
6 Adding a Library Target |
|
|
69 | (10) |
|
|
69 | (2) |
|
|
70 | (1) |
|
|
71 | (3) |
|
|
71 | (3) |
|
|
74 | (1) |
|
|
74 | (3) |
|
|
75 | (1) |
|
Debugging a Dependent Target |
|
|
76 | (1) |
|
|
77 | (2) |
|
|
79 | (26) |
|
|
80 | (2) |
|
Creating a Git Repository by Hand |
|
|
81 | (1) |
|
|
82 | (2) |
|
|
83 | (1) |
|
|
84 | (1) |
|
Working with Remote Repositories |
|
|
84 | (5) |
|
Setting Up a "Remote"-Locally |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
89 | (10) |
|
|
90 | (3) |
|
|
93 | (3) |
|
|
96 | (3) |
|
|
99 | (3) |
|
|
99 | (2) |
|
|
101 | (1) |
|
|
101 | (1) |
|
|
102 | (2) |
|
|
104 | (1) |
II The Life Cycle of an iOS Application |
|
105 | (214) |
|
8 Starting an iOS Application |
|
|
107 | (10) |
|
|
107 | (3) |
|
|
107 | (1) |
|
|
108 | (1) |
|
|
108 | (2) |
|
|
110 | (1) |
|
Starting a New iOS Project |
|
|
110 | (2) |
|
|
111 | (1) |
|
|
112 | (2) |
|
|
114 | (3) |
|
9 An IOS Application: Model |
|
|
117 | (24) |
|
|
117 | (6) |
|
|
118 | (1) |
|
|
118 | (2) |
|
|
120 | (3) |
|
|
123 | (5) |
|
Creating the Classes-the Wrong Way |
|
|
124 | (1) |
|
Why Doing It Xcode's Way Is a Mistake |
|
|
125 | (1) |
|
The Right Way-mogenera tor |
|
|
126 | (2) |
|
|
128 | (4) |
|
|
129 | (1) |
|
|
129 | (2) |
|
|
131 | (1) |
|
Specializing the Core Data Classes |
|
|
132 | (7) |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
134 | (2) |
|
Source Control and Product Files |
|
|
136 | (3) |
|
Making the Model Easier to Debug |
|
|
139 | (1) |
|
|
139 | (2) |
|
10 An MS Application: Controller |
|
|
141 | (16) |
|
Renaming Symbols in Objective-C |
|
|
141 | (3) |
|
Refactoring the Name of an Objective-C Method |
|
|
142 | (1) |
|
|
142 | (2) |
|
Renaming a Class in Swift |
|
|
144 | (1) |
|
Editing the View Controller |
|
|
144 | (4) |
|
|
145 | (1) |
|
Setting Up the Passer List |
|
|
146 | (1) |
|
|
147 | (1) |
|
|
148 | (1) |
|
|
149 | (6) |
|
|
149 | (5) |
|
|
154 | (1) |
|
|
155 | (2) |
|
|
157 | (28) |
|
|
157 | (4) |
|
If You Want to Add a View Controller |
|
|
157 | (1) |
|
Storyboards, Scenes, and Segues |
|
|
158 | (3) |
|
|
161 | (13) |
|
Outlets and Assistants, in Passing |
|
|
162 | (2) |
|
|
164 | (2) |
|
Linking Views to a View Controller |
|
|
166 | (1) |
|
Auto Layout for the Nonce |
|
|
167 | (2) |
|
|
169 | (2) |
|
|
171 | (3) |
|
|
174 | (1) |
|
|
175 | (8) |
|
|
177 | (1) |
|
|
177 | (1) |
|
Connecting GameListController |
|
|
178 | (2) |
|
Code Completion and Snippets |
|
|
180 | (1) |
|
|
181 | (2) |
|
Testing the Billboard View |
|
|
183 | (1) |
|
|
184 | (1) |
|
12 Auto Layout In a New View |
|
|
185 | (22) |
|
|
185 | (1) |
|
Limitations of Autoresizing |
|
|
185 | (1) |
|
|
186 | (1) |
|
|
186 | (1) |
|
The Player Billboard, Revisited |
|
|
186 | (2) |
|
|
187 | (1) |
|
Factoring Layout into Subviews |
|
|
188 | (9) |
|
|
189 | (2) |
|
|
191 | (5) |
|
|
196 | (1) |
|
|
197 | (3) |
|
Two Line Counts, Two Labels |
|
|
200 | (2) |
|
|
202 | (3) |
|
|
202 | (1) |
|
|
203 | (1) |
|
Landscape (wAny/hCompact) |
|
|
203 | (1) |
|
|
203 | (1) |
|
|
204 | (1) |
|
|
205 | (2) |
|
|
207 | (20) |
|
|
207 | (4) |
|
Outlets in the Table View |
|
|
207 | (1) |
|
Adding Required Protocol Methods |
|
|
208 | (2) |
|
Adding Model-to-View Support |
|
|
210 | (1) |
|
|
211 | (1) |
|
The Game Table: First Run |
|
|
211 | (3) |
|
|
214 | (3) |
|
|
217 | (8) |
|
A Cell with an Image in It |
|
|
217 | (1) |
|
Hooking the Image View to the Images |
|
|
218 | (1) |
|
|
219 | (1) |
|
Adding Images to the Assets Catalog |
|
|
220 | (1) |
|
Icons and Launch Displays |
|
|
221 | (4) |
|
|
225 | (2) |
|
|
227 | (16) |
|
|
227 | (1) |
|
|
227 | (6) |
|
An Embedded View Controller |
|
|
229 | (2) |
|
Linking the Editor to the Passer List |
|
|
231 | (1) |
|
|
232 | (1) |
|
The Editor View Controllers |
|
|
233 | (1) |
|
|
233 | (6) |
|
Passing the Data to the Editor |
|
|
235 | (2) |
|
|
237 | (2) |
|
|
239 | (1) |
|
|
240 | (3) |
|
|
243 | (22) |
|
|
244 | (2) |
|
|
246 | (8) |
|
|
247 | (5) |
|
|
252 | (1) |
|
|
252 | (2) |
|
|
254 | (2) |
|
|
256 | (4) |
|
|
260 | (1) |
|
Testing Asynchronous Code |
|
|
260 | (1) |
|
Documentation of Last Resort |
|
|
261 | (1) |
|
|
261 | (3) |
|
|
262 | (1) |
|
|
262 | (1) |
|
|
263 | (1) |
|
|
264 | (1) |
|
16 Measurement and Analysis |
|
|
265 | (14) |
|
|
265 | (11) |
|
|
266 | (2) |
|
|
268 | (8) |
|
|
276 | (1) |
|
|
277 | (1) |
|
|
278 | (1) |
|
|
279 | (18) |
|
|
280 | (1) |
|
|
281 | (4) |
|
|
282 | (3) |
|
A Shared Library in a Framework |
|
|
285 | (5) |
|
|
290 | (4) |
|
|
294 | (1) |
|
|
295 | (1) |
|
|
296 | (1) |
|
|
297 | (22) |
|
|
297 | (2) |
|
General (App Store) Program |
|
|
298 | (1) |
|
|
298 | (1) |
|
|
299 | (7) |
|
|
300 | (1) |
|
|
300 | (3) |
|
|
303 | (1) |
|
|
304 | (2) |
|
|
306 | (2) |
|
|
306 | (1) |
|
Capabilities for Both iOS and OS X |
|
|
306 | (1) |
|
|
307 | (1) |
|
|
308 | (3) |
|
|
310 | (1) |
|
|
310 | (1) |
|
Gatekeeper and Developer ID |
|
|
311 | (3) |
|
|
311 | (1) |
|
|
312 | (1) |
|
|
313 | (1) |
|
|
314 | (4) |
|
|
314 | (1) |
|
Adjusting the Build Settings |
|
|
315 | (2) |
|
|
317 | (1) |
|
|
318 | (1) |
III Xcode for Mac OS X |
|
319 | (114) |
|
19 Starting an OS X Application |
|
|
321 | (22) |
|
|
321 | (1) |
|
|
322 | (3) |
|
|
325 | (5) |
|
|
326 | (1) |
|
|
326 | (4) |
|
|
330 | (11) |
|
|
331 | (1) |
|
|
332 | (1) |
|
Loading Data into LeagueDocument |
|
|
333 | (1) |
|
Adapting to a Managed Document |
|
|
334 | (1) |
|
|
335 | (1) |
|
Identifying a Type for League Data |
|
|
336 | (2) |
|
Specifying How the App Handles League Files |
|
|
338 | (1) |
|
Application and Document Icons |
|
|
339 | (2) |
|
|
341 | (2) |
|
20 Bindings: Wiring an OS X Application |
|
|
343 | (30) |
|
Storyboard Segues in OS X |
|
|
343 | (2) |
|
Building the Document Window |
|
|
345 | (5) |
|
|
345 | (2) |
|
|
347 | (3) |
|
Filling the Table-Bindings |
|
|
350 | (7) |
|
|
352 | (2) |
|
Binding the Table to the Teams |
|
|
354 | (1) |
|
Binding the Columns to Team Properties |
|
|
355 | (2) |
|
The Arc of League Document Data |
|
|
357 | (14) |
|
From League Table to Source List |
|
|
357 | (2) |
|
Capturing the Team Selection |
|
|
359 | (2) |
|
|
361 | (2) |
|
|
363 | (8) |
|
|
371 | (2) |
|
|
373 | (28) |
|
|
373 | (1) |
|
|
374 | (2) |
|
|
374 | (1) |
|
|
375 | (1) |
|
Something Worth Localizing |
|
|
376 | (6) |
|
|
376 | (2) |
|
|
378 | (4) |
|
|
382 | (1) |
|
|
382 | (16) |
|
|
383 | (2) |
|
Starting Simple: Credits.rtf |
|
|
385 | (4) |
|
Localizing Main.storyboard |
|
|
389 | (3) |
|
|
392 | (2) |
|
Localizing Program Strings |
|
|
394 | (1) |
|
|
395 | (1) |
|
|
396 | (1) |
|
|
397 | (1) |
|
Localizing System Strings |
|
|
398 | (2) |
|
|
400 | (1) |
|
|
401 | (16) |
|
|
401 | (2) |
|
|
403 | (1) |
|
|
403 | (2) |
|
|
405 | (1) |
|
|
406 | (1) |
|
Info.plist Keys for Applications |
|
|
406 | (9) |
|
Keys for Both iOS and OS X |
|
|
406 | (3) |
|
|
409 | (3) |
|
|
412 | (3) |
|
|
415 | (2) |
|
|
417 | (16) |
|
|
417 | (2) |
|
|
419 | (10) |
|
|
422 | (5) |
|
Why Not the Property List Editor? |
|
|
427 | (2) |
|
|
429 | (2) |
|
|
429 | (1) |
|
|
430 | (1) |
|
|
430 | (1) |
|
Specialized Property Lists |
|
|
431 | (1) |
|
|
432 | (1) |
IV Xcode Tasks |
|
433 | (114) |
|
24 Documentation in Xcode |
|
|
435 | (24) |
|
|
435 | (2) |
|
|
435 | (1) |
|
|
436 | (1) |
|
|
437 | (1) |
|
|
438 | (1) |
|
|
439 | (5) |
|
|
439 | (1) |
|
The Table of Contents Sidebar |
|
|
440 | (1) |
|
|
440 | (1) |
|
|
440 | (4) |
|
|
444 | (2) |
|
|
446 | (10) |
|
|
446 | (3) |
|
|
449 | (5) |
|
|
454 | (1) |
|
|
455 | (1) |
|
Swift and reStructuredText |
|
|
456 | (2) |
|
|
458 | (1) |
|
25 The Xcode Build System |
|
|
459 | (30) |
|
How Xcode Structures a Build |
|
|
459 | (3) |
|
|
462 | (1) |
|
|
463 | (2) |
|
|
464 | (1) |
|
|
465 | (1) |
|
|
466 | (2) |
|
|
466 | (2) |
|
|
468 | (3) |
|
Creating a Configuration File |
|
|
468 | (1) |
|
SDK- and Architecture-Specific Settings |
|
|
469 | (1) |
|
Preprocessing xcconfig Files |
|
|
470 | (1) |
|
|
471 | (3) |
|
|
471 | (1) |
|
|
472 | (1) |
|
|
473 | (1) |
|
|
474 | (2) |
|
Builds in the Report Navigator |
|
|
476 | (1) |
|
A Simple Build Transcript |
|
|
476 | (11) |
|
|
487 | (2) |
|
|
489 | (26) |
|
|
489 | (1) |
|
|
490 | (2) |
|
The Trace Document Window |
|
|
492 | (8) |
|
|
492 | (2) |
|
|
494 | (1) |
|
|
495 | (1) |
|
|
495 | (4) |
|
|
499 | (1) |
|
|
500 | (4) |
|
|
500 | (3) |
|
|
503 | (1) |
|
Tracing without Instruments |
|
|
504 | (1) |
|
|
504 | (7) |
|
|
504 | (1) |
|
|
505 | (1) |
|
|
505 | (1) |
|
|
505 | (1) |
|
|
506 | (1) |
|
|
506 | (1) |
|
|
506 | (1) |
|
|
506 | (1) |
|
|
507 | (2) |
|
System-iOS Energy Instruments |
|
|
509 | (1) |
|
|
509 | (1) |
|
|
509 | (1) |
|
|
510 | (1) |
|
|
510 | (1) |
|
|
511 | (1) |
|
|
512 | (2) |
|
|
513 | (1) |
|
|
513 | (1) |
|
|
513 | (1) |
|
|
514 | (1) |
|
|
515 | (16) |
|
|
515 | (3) |
|
|
515 | (1) |
|
|
516 | (1) |
|
|
516 | (2) |
|
|
518 | (1) |
|
Doing More with Breakpoints |
|
|
518 | (3) |
|
|
521 | (2) |
|
|
523 | (2) |
|
|
525 | (3) |
|
|
528 | (3) |
|
|
531 | (16) |
|
|
531 | (10) |
|
|
531 | (4) |
|
|
535 | (1) |
|
|
536 | (2) |
|
Instruments and Debugging |
|
|
538 | (1) |
|
|
539 | (2) |
|
|
541 | (6) |
V Appendixes |
|
547 | (32) |
|
|
549 | (16) |
|
|
550 | (12) |
|
|
551 | (1) |
|
|
552 | (1) |
|
|
553 | (3) |
|
|
556 | (3) |
|
|
559 | (1) |
|
|
559 | (2) |
|
|
561 | (1) |
|
|
561 | (1) |
|
|
562 | (3) |
|
|
565 | (14) |
|
|
565 | (1) |
|
|
566 | (1) |
|
|
567 | (3) |
|
|
567 | (1) |
|
|
568 | (1) |
|
Developer Technical Support |
|
|
568 | (1) |
|
|
569 | (1) |
|
|
570 | (1) |
|
|
570 | (1) |
|
|
570 | (1) |
|
|
570 | (9) |
|
|
571 | (1) |
|
|
572 | (2) |
|
|
574 | (1) |
|
|
575 | (1) |
|
|
576 | (1) |
|
|
576 | (3) |
Index |
|
579 | |