CARVIEW |
iPhone JavaScript Cookbook
Formats:

save 15%!
save 10%!
Includes free access to the book on PacktLib
save 38%!

Also available on: |
![]() ![]() ![]() ![]() |
- Build web applications for iPhone with a native look feel using only JavaScript, CSS, and XHTML
- Develop applications faster using frameworks
- Integrate videos, sound, and images into your iPhone applications
- Work with data using SQL and AJAX
- Write code to integrate your own applications with famous websites such as Facebook, Twitter, and Flickr
- These practical recipes include code and screenshots offering a clear step-by-step guide using different frameworks
Book Details
Language : EnglishPaperback : 328 pages [ 235mm x 191mm ]
Release Date : June 2011
ISBN : 1849691088
ISBN 13 : 9781849691086
Author(s) : Arturo Fernandez Montoro
Topics and Technologies : All Books, iOS, Mobile, Cookbooks, Java
Table of Contents
PrefaceChapter 1: Frameworks Make Life Easier
Chapter 2: Building Interfaces
Chapter 3: Events and Actions
Chapter 4: A Picture Speaks a Thousand Words
Chapter 5: Mastering Sound and Music
Chapter 6: Exchanging Data: AJAX
Chapter 7: Working with Data: Storage and SQL
Chapter 8: This is a Phone
Chapter 9: Location, Location, Location
Chapter 10: Web 2.0 Integration
Index
- Chapter 1: Frameworks Make Life Easier
- Introduction
- Installing the iUI framework
- Installing the UiUIKit framework
- Installing the XUI framework
- Installing the iWebKit framework
- Installing the WebApp.Net framework
- Installing the PhoneGap framework
- Installing the Sencha Touch framework
- Installing the Apple Dashcode framework
- Chapter 2: Building Interfaces
- Introduction
- Creating a toolbar
- Modifying the default status bar
- Creating a footer
- Creating a back button
- Creating a button for the toolbar
- Building a breadcrumb menu
- Building the duo navigation buttons
- Building the lists for items
- Building menus using lists
- Creating the toggle buttons
- Creating a modal box with buttons
- Building a search dialog
- Building the information fields
- Building forms with checkboxes, radio buttons, select fields, and text fields
- Creating and customizing a notification box
- Building a chat-style interface
- Creating a date picker
- Using different tabs
- Chapter 3: Events and Actions
- Introduction
- Identifying the devices
- Viewing applications in full screen
- Detecting full screen or browser mode
- Scaling to device width
- Preventing scaling
- Detecting one-finger events
- Detecting multi-touch events
- Preventing the default behavior for events
- Detecting rotation events
- Implementing drag-and-drop
- Adding visual effects
- Running your web application without Internet access
- Chapter 4: A Picture Speaks a Thousand Words
- Introduction
- Choosing an icon image for the application
- Specifying a splash image
- Displaying an image inside a container
- Creating a grid with images
- Creating a carousel for images
- Rotating images
- Scaling an image by applying animations
- Taking and displaying pictures
- Drawing geometric figures
- Applying colors
- Working with gradients
- Adding an activity indicator
- Chapter 5: Mastering Sound and Music
- Introduction
- Making a beep alert
- Making a vibrate alert
- Creating an iPod playlist and playing a specific item
- Loading an iTunes playlist
- Playing an audio file
- Playing a video
- Recording an audio
- Chapter 6: Exchanging Data: AJAX
- Introduction
- How to send HTTP requests
- Processing JSON responses
- Sending cross-domain requests
- Chapter 7: Working with Data: Storage and SQL
- Introduction
- Creating a database
- Creating a table
- Inserting records
- Searching and selecting records
- Deleting records
- Saving and reading preferences
- Storing data in session
- Chapter 8: This is a Phone
- Introduction
- Calling a number
- Sending an SMS to a number
- Selecting contacts
- Creating a new contact
- Searching and displaying contacts
- Chapter 9: Location, Location, Location
- Introduction
- Detecting current orientation
- Identifying the current location
- Opening Google Maps at a specific location
- Calculating distances between two points
- Chapter 10: Web 2.0 Integration
- Introduction
- Embedding an RSS feed
- Opening a YouTube video
- Posting on your Facebook wall
- Retrieving recent tweets from Twitter
- Displaying photos from Flickr
Arturo Fernandez Montoro
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.
Code Downloads
Download the code and support files for this book.
Errata
- 2 submitted: last submission 04 May 2012Errata type: Typo | Page number: 33
Under How to do it... the first step. The code is not valid. Both tags are missing space. Instead of "linkhref" it should be "link href". And "scriptsrc" should be "script src".
Errata type: Typo | Page number: 51
The last word on this page says "The required code is as follows" shouldn't be there.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
What you will learn from this book
- Installing and configuring a set of frameworks to make your life easier for developing web applications for iPhone
- Designing graphical user interfaces for iPhone applications using XHTML, CSS, and JavaScript
- Working with different events, actions, and effects, including touch gestures, multi-touch events, drag & drop, and sliding
- Dealing with images and pictures including accessing the device's camera
- Adding video and sound for your iPhone web applications
- Applying AJAX for better performance in web applications
- Differences between native and web applications for iPhone
- Working with data and SQL using the new HTML 5 features of Safari Mobile
- Accessing phone-specific features such as the Address Book for contacts
- Recognizing accelerometer movements and other features about positioning and geolocation
- Integrating your application with popular third-party websites and services such as Facebook, Twitter, and Flickr
Special Offers

Annual subscription:
$220.00 per annum
Monthly subscription:
$21.99 per month
|
In Detail
Undoubtedly, the iPhone is one of the most exciting mobile devices in the world. Its iOS is used in other Apple devices such as the iPad and iPod Touch. With this book you'll learn how to build and develop applications for these devices without applying Apple's burdensome and at times restrictive technologies. Just use your experience and knowledge combined with web front-end technologies like JavaScript to build quality web apps. Nobody will know you haven't used Objective-C and Cocoa.
The iPhone JavaScript Cookbook offers a set of practical and clear recipes with a step-by-step approach for building your own iPhone applications applying only web technologies such as JavaScript and AJAX. Web developers won't need to learn a new programming language for building iOS applications with a native look and feel.
The first part of the book introduces you to the world of iPhone applications. Understanding how it works is required for designing good user interfaces for this device. You will continue learning about how to apply multimedia features to your applications. Common features of web applications, such as AJAX and SQL, can also be applied to our iPhone applications. The third part of the book explains how to deal with specific features of iPhone such as the accelerometer. At the end, you learn how to offer additional features through external websites. With the iPhone JavaScript Cookbook, you will be able to develop outstanding web applications with a for Apple's mobile devices, offering your users all of the advantages of the native look and feel.
Approach
Written in a cookbook style, this book offers solutions using a recipe-based approach. Each recipe contains step-by-step instructions followed by an analysis of what was done in each task and other useful information. The cookbook approach means you can dive into whatever recipes you want in no particular order.
Who this book is for
This book is for web developers interested in applying their knowledge for building web applications for iOS devices. You can develop your own iPhone web applications using nothing but JavaScript combined with XHTML and CSS. You can even give these apps a native look and feel though you won't be able to submit them to the App Store. You will develop an application for iOS without having to learn the Objective-C programming language. This is the book for any iPhone developer looking to side-step Apple's totalitarian App Store regime.
Alternative Books
If this isn't the right book for you, take a look at some of our other offerings below.
-
- Learn how Dynamics NAV ERP suite is set up and customized for various industries
- Integrate numerous parts of a company's operations including financial reporting, sales, order management, inventory, and forecasting
- Develop complete applications and not just skeleton systems
- Covers the design and implementation of two new add-on services: The Squash application and the Storage & Logistics application
- Also usable for previous versions such as 3.x, 4.0, and 5.0
- Easy-to-read style, packed with hard-won practical advice
- Real-world examples with step-by-step explanations
-
- Technical foundations of the Documentum platform
- Over 200 practice questions and three practice tests
- Up-to-date information on version 6.5 SP2 including presets, aspects, new Webtop interface, lightweight types, Composer, and DFS
- Over 200 illustrations and many more examples from a real-life business scenario
-
- Easy-to-follow introduction to OGRE 3D
- Create exciting 3D applications using OGRE 3D
- Create your own scenes and monsters, play with the lights and shadows, and learn to use plugins
- Get challenged to be creative and make fun and addictive games on your own
- A hands-on do-it-yourself approach with over 100 examples
-
- Written in an accessible readable style, this practical book will help you to successfully master user authentication, authorization, and user management in Siebel CRM
- Set up the organization and position hierarchy as well as create user accounts in step-by-step examples
- Instructions valid for versions 8.0, 8.1, and 8.2
-
- Optimize time-consuming tasks efficiently using three Oracle database utilities
- Get to grips with user session management issues
- Boost database defences with Oracle Wallet Manager and Security
- A focused handbook with practical content and real-life scenarios
-
- The first book on the newly released Inkscape version 0.48, with an exclusive focus on web design
- Incorporate eye-catching designs, charts, and other visual elements to spice up your web pages
- Learn how to create your own Inkscape templates in addition to using the built-in ones
- Written in a simple illustrative manner, which will appeal to web designers and experienced Inkscape users alike
-
- Focusses on 3 key areas of development with Seam – testing, persistence and security
- Test your site to ensure efficiency
- Learn how to develop persistent applications
- Secure your web application with user authentication and OpenID.
-
- Covers the full spectrum of features offered by the NetBeans IDE
- Discover ready-to-implement solutions for developing desktop and web applications
- Learn how to deploy, debug, and test your software using NetBeans IDE
- Another title in Packt's Cookbook series giving clear, real-world solutions to common practical problems
-
New jQuery Book Released jQuery Tools UI Library will show you how to add useful functionality to your website, using the compact but powerful jQuery Tools library.Get inspiration for developing your own ideas with the book.
Learn More Download a free chapter - Quickly look up features of the jQuery library
- Step through each function, method, and selector expression in the jQuery library with an easy-to-follow approach
- Understand the anatomy of a jQuery script
- Write your own plug-ins using jQuery's powerful plug-in architecture
- Written by the creators of learningquery.com
- Check out the new Learning jQuery Third Edition here
-
- An introduction to jQuery that requires minimal programming experience
- Detailed solutions to specific client-side problems
- For web designers to create interactive elements for their designs
- For developers to create the best user interface for their web applications
- Packed with great examples, code, and clear explanations
- Revised and updated version of the first book to help you learn jQuery
![]() |
RSS Feed |
![]() |
Sign up to Packt's newsletter |
![]() |
Follow Packt at Twitter |
![]() |
Join our Facebook Group |
Customer service body text... insert content here.
Returns Centre body text... insert content here.
Packt Updates
We accept the following

Footer Copyright
This site requires cookies to be enabled in your browser. Packt Publishing 2012
Links to Packt information
Click here to view Packt's cookie policy. This explains the cookies on Packt's website, and why we use them. It also explains information on how to manage your cookies.
By closing this banner, you are consenting to our use of cookies on your device, unless you have disabled them in your browser.