This book covers the various aspects of developing web– based applications for iOS. Over the past four years, the iPhone and iPad have been amazingly successful. Because of this success, application developers are entering a world of sophisticated, multifunctional mobile applications. Now mobile web– based applications can bring together web apps, native apps, multimedia video and audio, and the mobile device itself. By using this book you will learn how to create a mobile application from beginning to end, utilizing open source frameworks to speed up development times, emulate the look and feel of built– in Apple applications, capture finger touch interactions, and optimize applications for Wi– Fi and wireless networks. The book introduces you to the web application platform for iOS. It also guides you through the process of building new applications from scratch as well as migrating existing web applications to this new mobile platform. By doing this, the book helps readers design a user interface that is optimized for iOS touch– screen displays and integrate their applications with iPhone services, including Phone, Mail, Google Maps, and GPS. This book is aimed at beginning and intermediate web developers who want to learn how to build new applications for iOS or migrate existing web apps to this platform. In general, you will find it helpful if you have a working knowledge of these technologies: HTML/XHTML CSS JavaScript Ajax This book covers the various aspects of developing web– based applications for iOS. Over the past four years, the iPhone and iPad have been amazingly successful. Because of this success, application developers are entering a world of sophisticated, multifunctional mobile applications. Transfer your existing skills to the iOS platform Are you already proficient in HTML, CSS, JavaScript, and Ajax and eager to create apps that can be rapidly deployed across mobile devices— but you don′ t want to have to learn a whole new technology in order to do so? Then this is the book for you. Written by an experienced web designer and developer, this helpful guide enables you to use what you already know and gets you up to speed quickly with applying your existing skills to the mobile platform so that you can start developing apps for the iPhone, iPod touch, and iPad today. After an introduction to iOS development using web technologies, the book then explains how to work with core technologies, enable and optimize websites for the iPhone and iPad, style with CSS, program the interface, and, ultimately, submit your apps to the App Store. Beginning iOS Application Development with HTML and JavaScript: Zeroes in on handling touch interactions, detecting an orientation change, and changing a style sheet when orientation changes Explores animation, special effects, gradients, shadows and reflections, masks, and more Demonstrates how to interact with native iPhone services Addresses programming the canvas, building with web app frameworks, handling bandwidth and performance optimizations, and debugging and deploying Shows how you can use PhoneGap to create a native iOS app Highlights comparing the strengths of web apps and native apps Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved. Programmer Forums Join our Programmer to Programmer forums to ask and answer programming questions about this book, join discussions on the hottest topics in the industry, and connect with fellow programmers from around the world. Code Downloads Take advantage of free code samples from this book, as well as code samples from hundreds of other books, all ready to use. Read More Find articles, ebooks, sample chapters and tables of contents for hundreds of books, and more reference resources on programming topics that matter to you. wrox.com Transfer your existing skills to the iOS platform Are you already proficient in HTML, CSS, JavaScript, and Ajax and eager to create apps that can be rapidly deployed across mobile devices— but you don′ t want to have to learn a whole new technology in order to do so? Then this is the book for you. Written by an experienced web designer and developer, this helpful guide enables you to use what you already know and gets you up to speed quickly with applying your existing skills to the mobile platform so that you can start developing apps for the iPhone, iPod touch, and iPad today. After an introduction to iOS development using web technologies, the book then explains how to work with core technologies, enable and optimize websites for the iPhone and iPad, style with CSS, program the interface, and, ultimately, submit your apps to the App Store. Beginning iOS Application Development with HTML and JavaScript: Zeroes in on handling touch interactions, detecting an orientation change, and changing a style sheet when orientation changes Explores animation, special effects, gradients, shadows and reflections, masks, and more Demonstrates how to interact with native iPhone services Addresses programming the canvas, building with web app frameworks, handling bandwidth and performance optimizations, and debugging and deploying Shows how you can use PhoneGap to create a native iOS app Highlights comparing the strengths of web apps and native apps Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved. Programmer Forums Join our Programmer to Programmer forums to ask and answer programming questions about this book, join discussions on the hottest topics in the industry, and connect with fellow programmers from around the world. Code Downloads Take advantage of free code samples from this book, as well as code samples from hundreds of other books, all ready to use. Read More Find articles, ebooks, sample chapters and tables of contents for hundreds of books, and more reference resources on programming topics that matter to you. wrox.com INTRODUCTION xxiii PART I: GETTING STARTED CHAPTER 1: INTRODUCING IOS DEVELOPMENT USING WEB TECHNOLOGIES 3 CHAPTER 2: WORKING WITH CORE TECHNOLOGIES 15 CHAPTER 3: THE DOCUMENT OBJECT MODEL 47 CHAPTER 4: WRITING YOUR FIRST HELLO WORLD APPLICATION 65 CHAPTER 5: ENABLING AND OPTIMIZING WEB SITES FOR THE IPHONE AND IPAD 79 PART II: APPLICATION DESIGN CHAPTER 6: DESIGNING THE IPHONE UI 99 CHAPTER 7: DESIGNING FOR IPAD 117 CHAPTER 8: STYLING WITH CSS 135 PART III: APPLICATION DEVELOPMENT CHAPTER 9: PROGRAMMING THE INTERFACE 153 CHAPTER 10: HANDLING TOUCH INTERACTIONS AND EVENTS 189 CHAPTER 11: SPECIAL EFFECTS AND ANIMATION 207 CHAPTER 12: INTEGRATING WITH IOS SERVICES 223 CHAPTER 13: PACKAGING APPS AS BOOKMARKS: BOOKMARKLETS AND DATA URLS 235 PART IV: ADVANCED PROGRAMMING TECHNIQUES CHAPTER 14: PROGRAMMING THE CANVAS 251 CHAPTER 15: OFFLINE APPLICATIONS 269 CHAPTER 16: BUILDING WITH WEB APP FRAMEWORKS 287 CHAPTER 17: BANDWIDTH AND PERFORMANCE OPTIMIZATIONS 303 CHAPTER 18: DEBUG AND DEPLOY 317 PART V: NEXT STEPS: DEVELOPING NATIVE IOS APPLICATIONS WITH HTML AND JAVASCRIPT CHAPTER 19: PREPARING FOR NATIVE IOS DEVELOPMENT 333 CHAPTER 20: PHONEGAP: NATIVE APPS FROM YOUR HTML, CSS, AND JAVASCRIPT 345 CHAPTER 21: SUBMITTING YOUR APP TO THE APP STORE 363 APPENDIX: EXERCISE ANSWERS 375 INDEX 381 Richard Wagner is Lead Product Architect of Mobile/Web at Maark, LLC. He is an experienced web designer and developer and the author of several web– related books on the underlying technologies of the iPhone application platform.