E-Book, Englisch, 360 Seiten
Smith / Penberthy / Chin More iPhone Cool Projects
1. ed
ISBN: 978-1-4302-2923-0
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
Cool Developers Reveal the Details of their Cooler Apps
E-Book, Englisch, 360 Seiten
ISBN: 978-1-4302-2923-0
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark
Everyone is developing iPhone applications, and it's clear why. The iPhone is the coolest mobile device available, and the App Store makes it simple to get an application out into the unstoppable iPhone app market. With hundreds of thousands of app developers entering the game, it's crucial to learn from those who have actually succeeded. This book shows you how some of the most innovative and creative iPhone application developers have developed cool, best-selling apps. Not only does every successful application have a story, but behind every great app is excellent code. In this book, you'll see the code and learn how to use it to make your own cool applications. You'll learn everything from importing 3D art assets into your iPhone game to using Cocos2d for iPhone and iPad. This book shares the secrets of the coolest iPhone apps being built today by the best iPhone developers-invaluable knowledge for anyone who wants to create the app that everyone is talking about.
Ben Britten Smith has been writing software on Apple platforms for 15 years. Most notably, he was given an Academy Award for technical achievement for his feature film work with Mac-based suspended camera control systems. Lately, he has switched his efforts from the big screen to the small screen. His first iPhone game, SnowDude, was published to the App Store a few months after the software development kit became available. Since then, he has written a dozen apps for various clients, including the games Snowferno, the award winning Mole Quest for the Terracore Gem, and the Gamebook Adventures series. Ben lives in Melbourne, Australia with his wife, Leonie, and their pet bunnies.
Autoren/Hrsg.
Weitere Infos & Material
1;Title Page;1
2;Copyright Page;2
3;Contents at a Glance;4
4;Table of Contents;5
5;Preface;10
6;Acknowlegments;11
7;Introduction;12
7.1;Who This Book Is For;12
7.2;What’s in the Book;13
8;Danton Chin;14
8.1;Chapter 1 Using Concurrency to Improve the Responsiveness of iPhoneand iPad Applications;16
8.1.1;Prepare for Concurrency;16
8.1.2;Non-Responsive User Interfaces;19
8.1.2.1;Building the Interestingness User Interface;20
8.1.2.2;Adding A JSON Parsing Framework to the InterestingnessApp;23
8.1.2.3;Composing a RESTful Request for a List of Interestingness Images;23
8.1.2.4;Using the RESTful Request and the JSON Parser to Parse the Response;25
8.1.2.5;Implementing the UITableViewDataSource Protocol Methods to Display the Results;27
8.1.3;Concurrency Landscape;29
8.1.4;Considerations When Using Concurrent Solutions;30
8.1.5;Concurrency with NSThread and NSObject;32
8.1.6;Concurrency with Operation Objects;37
8.1.6.1;NSOperationQueue;38
8.1.6.2;NSOperation and NSInvocationOperation;39
8.1.6.2.1;NSInvocationOperation—Quick and Easy;40
8.1.6.2.2;Subclassing NSOperation;40
8.1.6.2.3;Building HelloOperationQueues—a Toy Application;41
8.1.6.2.4;Building the User Interface for HelloOperationQueues;43
8.1.6.2.5;Creating Work Units by Subclassing NSOperation;45
8.1.6.2.6;Implementing HelloOperationQueues;46
8.1.6.2.7;Changing the Interestingness App to Use NSOperationQueues;50
8.1.6.2.8;Implementing the NSInvocationOperation to Fetch the List of interestingness images;52
8.1.6.2.9;Implementing FetchImageOperation a Subclass of NSOperation;53
8.1.6.2.10;Implementing the getImageForURL: and storeImageForURL:Methods;55
8.1.6.3;Concurrency with Operation Objects and Blocks;58
8.1.6.3.1;Blocks;59
8.1.6.3.1.1;Adding the PLBlocks Framework;61
8.1.6.3.1.2;Changing the Interestingness Application to Use NSOperationQueues and Blocks;63
8.1.6.3.1.3;Converting the Interestingness App to Use an Official Version of Blocks and NSBlockOperation from Apple;66
8.1.7;Summary;66
8.1.8;Resources;67
8.1.8.1;Apple and Apple-related News;67
8.1.8.2;Apple Documentation;67
8.1.8.3;Blocks and Grand Central Dispatch;68
8.1.8.4;General;69
8.1.8.5;JSON;69
8.1.8.6;POSIX Threads;69
9;Claus Höfele;70
9.1;Chapter 2 Your Own Content Pipeline: Importing 3D Art Assets into Your iPhoneGame;72
9.1.1;Starting an iPhone Game;72
9.1.2;Why Write Your Own Tools?;73
9.1.3;Creating a Flexible Content Pipeline;74
9.1.3.1;The Tools Problem;74
9.1.3.2;Data Exchange vs. In-Game File Formats;76
9.1.4;Outline of the Example Code;77
9.1.5;Exporting 3D Models;78
9.1.5.1;Reading FBX files;79
9.1.6;Traversing the Scene Contents;82
9.1.7;Distinguishing between Different Types of Scene Nodes;83
9.1.7.1;OpenGL Triangle Data;84
9.1.7.2;Converting FBX Models into Triangle Data;86
9.1.7.3;Converting Triangle Data into an In-Game Format;89
9.1.8;Handling Textures;92
9.1.8.1;Image Compression vs. Texture Compression;92
9.1.8.2;Imagination’s PVRTC Format;93
9.1.8.3;Reading PNG Images;95
9.1.8.4;Converting Images into the PVRTC Format;97
9.1.9;Rendering the Converted Data on the iPhone;99
9.1.9.1;Running the Converter Tool;99
9.1.9.2;Creating the iPhone Project;99
9.1.10;Summary;100
10;Ben Kazez;102
10.1;Chapter 3 How Flight Track Uses External Data Providers to Power This Best-SellingTravel App;104
10.1.1;Choosing a Data Source;105
10.1.1.1;API Design;106
10.1.1.2;Data Coverage and Accuracy;107
10.1.1.3;Economics;108
10.1.1.3.1;Attribution;108
10.1.1.3.2;Subscription;108
10.1.1.3.3;Transactional;108
10.1.1.3.4;Revenue Share;109
10.1.1.4;Trials;109
10.1.2;Source-Driven User Interface Design;109
10.1.2.1;Challenges;110
10.1.2.2;Techniques from FlightTrack;111
10.1.3;Design Patterns for Data Source Consumption;112
10.1.3.1;Direct-Client Consumption;112
10.1.3.2;Server-Intermediary Consumption;113
10.1.4;Data-Driven Cocoa App Architecture;114
10.1.4.1;Data Model Design;114
10.1.4.2;Connecting Data to UI;115
10.1.4.2.1;Delegates;115
10.1.4.2.2;Notifications;116
10.1.4.2.3;Setter Propagation;117
10.1.4.3;Choosing an Approach;117
10.1.5;Release!;118
10.1.6;FlightTrack Today;118
11;Saul Mora;120
11.1;Chapter 4 Write Better Code and Save Time with Unit Testing;122
11.1.1;Mock Objects;133
11.1.2;Testing Your Core Data Models;140
11.1.3;Summary;147
12;Leon Palm;148
12.1;Chapter 5 Fun with Computer Vision:Face Recognition with OpenCV on the iPhone;150
12.1.1;What Is Computer Vision?;153
12.1.2;Why Do Computer Vision on an iPhone?;154
12.1.3;Your Project: Creating a Face Detector;155
12.1.3.1;Setting Up OpenCV;155
12.1.3.2;Setting Up XCode;158
12.1.3.3;Adding Image Conversion Functions;160
12.1.3.4;Creating a Simple GUI;162
12.1.3.5;Loading Images from the Photo Library;164
12.1.3.6;Loading the Haar Cascades;165
12.1.3.7;Performing Face Detection;167
12.1.3.8;Bonus;169
12.1.4;Performance Tweaking;170
12.1.5;Going Further;172
12.1.6;Summary;173
13;Scott Penberthy;174
13.1;Chapter 6 How to Use OpenGL Fonts without Losing Your Mind;176
13.1.1;History;177
13.1.2;Terminology;178
13.1.3;Pragmatic Fontery;180
13.1.4;fCookie;180
13.1.5;Creating a Font’s Texture Atlas;181
13.1.5.1;Texture Mapping;184
13.1.5.2;Opening Your App;186
13.1.6;The Fontery Classes;186
13.1.6.1;APGlyph;187
13.1.6.2;APChar;188
13.1.6.3;APText;190
13.1.7;Putting It All Together;192
13.1.8;Setting Up the Display;194
13.1.9;Creating Your Fortune;195
13.1.10;Displaying the Fortune;197
13.1.11;Summary;200
14;Ben Britten Smith;201
14.1;Chapter 7 Game Development with Unity;203
14.1.1;What Is Unity?;204
14.1.2;Why Use Unity?;205
14.1.3;Exploring the Unity Interface;207
14.1.3.1;The Scene View;208
14.1.3.2;The Game View;209
14.1.3.3;The Project View;210
14.1.3.4;The Hierarchy View;210
14.1.3.5;The Inspector View;210
14.1.3.6;How the Pipeline Flows;210
14.1.3.7;The Transform: Everybody Has One;211
14.1.3.8;Meshes, Renderers, and Materials;212
14.1.3.9;Importing Assets;216
14.1.3.10;Custom Scripting;217
14.1.3.11;Playing Your Game;220
14.1.3.12;Coroutines Not Updates;221
14.1.3.13;The Game View;222
14.1.3.14;Adding Lights;225
14.1.3.15;Using the iPhone as a Game Pad;226
14.1.4;Your Game;227
14.1.4.1;Adding a Base to Work From;228
14.1.4.2;The Main Character;230
14.1.4.3;Inputs and Colliders;236
14.1.4.4;Your First Design Iteration;240
14.1.4.5;Adding More Touchable Objects;242
14.1.4.6;Prefabs;243
14.1.4.7;Animations;244
14.1.4.8;Animation Import Settings;245
14.1.4.9;Interacting with Something Besides the Floor;249
14.1.4.10;User Interface;252
14.1.4.11;Multiple Cameras;253
14.1.4.12;3D Objects As GUI Items;255
14.1.4.13;Building for Your Device;259
14.1.5;Summary;260
15;Chuck Smith;261
15.1;Chapter 8 Cocos2d for iPhone and iPad; It Is Easier than YouThink263
15.1.1;Origins of Cocos2d;263
15.1.2;Why Use Cocos2d?;264
15.1.3;Getting Started with Cocos2d;264
15.1.3.1;Installing Cocos2d;266
15.1.3.2;Configuring Sample Code;266
15.1.3.3;Installing the XCode Project Templates;267
15.1.3.4;Starting a New Project;268
15.1.4;Introduction to Video Poker;269
15.1.5;Making a Scene;270
15.1.5.1;Creating a Game Menu;272
15.1.6;Game Logic;273
15.1.6.1;Card;274
15.1.6.2;Deck;276
15.1.6.3;SimpleHand;278
15.1.6.4;I Like the Sprites in You;282
15.1.6.4.1;Load and Display a Sprite;282
15.1.6.4.2;Manipulating Sprites;283
15.1.6.4.2.1;Spawns;283
15.1.6.4.2.2;Sequences;284
15.1.6.5;Putting It All together;284
15.1.6.6;Events: Making It Interactive;287
15.1.6.6.1;Detecting Sprite Taps;288
15.1.6.6.2;Combining Many Actions Together;290
15.1.6.6.3;Switching a Sprite Image;291
15.1.7;Adding Sound;292
15.1.8;Supporting the iPad;293
15.1.9;Further Exploring cocos2d;298
16;David Smith;299
16.1;Chapter 9 Creating an Audio-Centric App for the iPhone with AVAudioPlayer;301
16.1.1;Design;302
16.1.1.1;Designing for Your Target User;302
16.1.1.2;Our Design Process;303
16.1.1.2.1;Home Screen;303
16.1.1.2.2;Book Selection Screens;304
16.1.1.2.3;Book Information Screen;304
16.1.1.2.4;Player Screen;305
16.1.2;Implementation;307
16.1.3;Example Project;308
16.1.3.1;Getting Started;308
16.1.3.2;Setting Up the UI;310
16.1.3.3;Coding the Audio Player;314
16.1.3.3.1;Connecting the Play/Pause Button;316
16.1.3.3.2;Connecting the Skip Controls;317
16.1.3.3.3;Providing Player State in the UI;317
16.1.3.3.4;Understanding Audio Sessions;318
16.1.4;Summary;319
17;Joost van de Wijgerd and Arne de Vries;320
17.1;Chapter 10 Implementing PushNotifications at eBuddy;322
17.1.1;Introduction to eBuddy;322
17.1.1.1;The eBuddy Messenger;323
17.1.1.2;The eBuddy iPhone Application;323
17.1.2;Apple Push Notification Service;324
17.1.2.1;The Communication Flow;325
17.1.2.2;The Client Implementation;325
17.1.3;The eBuddy Push Implementation;328
17.1.3.1;Client / Server Protocol;328
17.1.3.2;Server to APNS;329
17.1.3.3;Fitting the Parts Together;333
17.1.4;Changes along the Way;334
17.1.4.1;Introducing eBuddy Pro;334
17.1.4.2;Extending the Beta Program;335
17.1.5;Summary;336
18;Index;337




