![]()
Mastering PhoneGap Mobile Application Development
Table of Contents
Mastering PhoneGap Mobile Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Task Automation
Before we begin
About Logology
Why use Gulp for task automation?
Setting up your app's directory structure
Installing Gulp
Creating your first Gulp configuration file
Creating a modular Gulp configuration
Copying assets
Performing substitutions
How to execute Cordova tasks
Managing version numbers
Supporting ES2015
Linting your code
Uglifying your code
Putting it all together
Summary
2. ECMAScript 2015 and Browserify
Getting started
Benefits of ES2015
Block scope
Arrow functions
Simpler object definitions
Default arguments
Variable arguments
Destructuring and named parameters
String interpolation
Promises and a taste of ES2016
Classes
Modules
More information
Using Browserify
Modifying our Gulp configuration
Including Node.js packages
Summary
3. Sassy CSS
Getting started
Learning Sass
Comments
Calculation
Variables
Nesting
Mixins and functions
Object-oriented CSS
Modules and partials
Integrating Sass with Gulp
Including the Stylesheets installed via npm
Summary
4. More Responsive Design
Getting started
Pixel densities
The CSS3 units
Media queries
Image sizing
Using flex-box layout
Summary
5. Hybrid Application Accessibility
Getting started
Types of accessibility features
Color vision deficient
Low vision
Blindness
Auditory disabilities
Motor disabilities
Dyslexia
Seizures
Accessibility for free
What is WAI-ARIA?
The WAI-ARIA roles
Accessibility examples
Separation of presentation and content
Accessible icon buttons
Accessible navigation
Accessible lists
Accessible alerts and dialogs
Fitting in with native accessibility features
Installing the Mobile Accessibility Plugin
Detecting the user's preferred text size
Detecting a screen reader
Speaking custom text
Useful tools
Summary
6. Testing and UI Automation
Getting started
An introduction to assertions
Writing tests using Chai
Language chains
Logical words
Testing existence and types
Testing equality
Testing collections
Running test suites using Mocha
Writing UI automation tests
Installing Appium
Exploring your app with Appium
Creating test cases
Running UI Automation tests using Appium and Mocha
Integrating our tests with Gulp
Summary
7. IndexedDB
Getting started
IndexedDB support and polyfills
Differences between relational and key-object storage
Creating a database
Creating an object store within the database
Handling database upgrades
Transactions
Storing objects
Getting objects
Deleting objects
Using cursors and indexes
Closing the database
Additional resources
Summary
8. Web SQL Database
Getting started
Web SQL Database support
The Cordova SQLite plugin
Creating and opening databases
Transactions
Creating tables
Inserting data and binding values
Querying data (single table, joins, and so on)
Deleting data
The SQLite utilities
Summary
9. Transferring Files
Getting started
Configuring the whitelist
Downloading files from a server
Receiving files using PHP on a server
Uploading files to a server
Monitoring progress
Aborting transfers
Security concerns
Summary
10. Performance
Getting started
Defining performance
The performance difference between desktop browsers, emulators, and physical devices
Desktop browser performance differences
Power availability and consumption
Battery life
Browser impacts
Memory
Storage
Lag
Emulator performance differences
Profiling your app
Profiling on Android
Profiling on iOS
Caveats
Correcting input lag
Correcting visual stutters
Reaching 60 fps
Correcting memory problems
Splitting up and delegating long computations
Summary
11. Graphical Assets
Getting started
App icon requirements
Creating an app icon
Launch screen requirements
Creating a Launch Screen
Configuring your app
Useful resources
Summary
12. Deployment
Build modes
Distribution methods
Signing up for developer accounts
Becoming an Apple iOS developer
Becoming a Google Play Store developer
Generating signed release builds
Managing the iOS signing identities
Managing iOS App IDs
Managing iOS devices
Managing the iOS provisioning profiles
Creating an Android keystore
Signing the release build
Deploying ad hoc releases
Deploying via e-mail
Deploying via URL
Deploying via Diawi
Deploying app store releases
Deploying to the Apple App Store
Deploying to the Google Play Store
Resources
Summary
Index
![]()
Mastering PhoneGap Mobile Application Development
Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: February 2016
Production reference: 1190216
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-843-4
www.packtpub.com
![]()
Author
Kerri Shotts
Reviewers
Michael Brooks
Rory Standley
Eddy Verbruggen
Commissioning Editor
Akram Hussain
Acquisition Editors
Reshma Raman
Owen Roberts
Content Development Editor
Dharmesh Parmar
Technical Editors
Chinmay S. Puranik
Jayesh Sonawane
Copy Editor
Akshata Lobo
Project Coordinator
Nidhi Joshi
Proofreader
Safis Editing
Indexer
Tejal Daruwale Soni
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
![]()
Kerri Shotts has worked with computers for nearly 25 years. Her love for technology and programming started when she was introduced to her first computer: a Commodore 64. She obtained a degree in computer science while at college, and moved on to become a software test engineer. Afterward, she became an Oracle Database Administrator for several years. Now, she works as a technology consultant, creating, i...