Book Image

PhoneGap 3 Beginner's Guide

By : Giorgio Natili
Book Image

PhoneGap 3 Beginner's Guide

By: Giorgio Natili

Overview of this book

<p>You don’t have to know complex languages like Objective C to compete in the ever-growing mobile market place. The PhoneGap framework lets you use your web development skills to build HTML and JavaScript-based mobile applications with native wrappers that run on all the major mobile platforms, including Android, iOS, and Windows Phone 8.</p> <p>"PhoneGap 3 Beginner's Guide" will help you break into the world of mobile application development. You will learn how to set up and configure your mobile development environment, implement the most common features of modern mobile apps, and build rich, native-style applications. The examples in this book deal with real use case scenarios, which will help you develop your own apps, and then publish them on the most popular app stores.</p> <p>Dive deep into PhoneGap and refine your skills by learning how to build the main features of a real world app.</p> <p>"PhoneGap 3 Beginner's Guide" will guide you through the building blocks of a mobile application that lets users plan a trip and share their trip information. With the help of this app, you will learn how to work with key PhoneGap tools and APIs, extend the framework’s functionality with plug-ins, and integrate device features such as the camera, contacts, storage, and more. By the time you’re finished, you will have a solid understanding of the common challenges mobile app developers face, and you will know how to solve them.</p>
Table of Contents (22 chapters)
PhoneGap 3 Beginner's Guide
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

A note about operating systems


We touched on this in the preface but it's worth emphasizing again: PhoneGap plays by the rules. If a vendor releases an SDK for a single operating system only, then you will have to use that OS to build and deploy your applications.

In detail, for each PhoneGap platform:

  • You can develop Android apps on any of the major desktop operating systems—Windows, Mac OS X, or Linux

  • You can develop Symbian Web Runtime apps on any OS but you can only run the simulator from Windows

  • You can develop apps for BlackBerry on any of the major desktop operating systems—the SDK can be installed on Windows or Mac OS X (to run the emulator you need to install the virtual machine distributed with the SDK)

  • The Windows Phone 7 SDK runs on Windows Vista SP2 and on Windows 7

  • The iOS SDK requires OS X 10.7 or later (and, according to the OS X EULA, a Mac computer as well)

Note

You can emulate apps in the desktop browser with Ripple (a Chrome extension that is currently incubated in the Apache Software Foundation http://incubator.apache.org/projects/ripple.html) or with the online emulation service available at http://emulate.phonegap.com.

Practically speaking, your best bet for mobile development is to get a Mac and install Windows on a separate partition that you can boot into, or run it in a virtual environment using Parallels or VMWare Fusion . According to Apple's legal terms, you cannot run Mac OS X on non-Apple hardware; if you stick with a Windows PC, you will be able to build for every platform except iOS (if you want to ignore Apple's legal terms refer to this tutorial http://lifehacker.com/5938332/how-to-run-mac-os-x-on-any-windows-pcusing-virtualbox and run OSX on a Windows PC).

Anyway, with the new CLI utilities it is getting to be pretty straightforward to build an app for all major mobile platforms. Mobile developers are well aware of the problems involved in building cross-platform apps; not surprisingly, the http://build.phonegap.com service is starting to become pretty popular due to the fact that it lets the developer use his/her favorite operating system. After registering with this service, it's possible to build a cross-platform app starting from a common code base. You can upload the code base or pull it from a GitHub repository. When compiling the app it's possible to enable or disable the debug and to activate the hydration services. Hydration is able to push updates directly to the application installed on a device. This is accomplished by compiling a native binary that acts as a container for the mobile application. Once a new build is uploaded the end user (for example, tester) will be notified upon restart of the app. At the end of this book I have included a section dealing with the distribution process for mobile applications.