The PhoneGap framework (from Apache Cordova) also allows you to work with one code base, but with a different set of technologies. PhoneGap is an open source, cross-platform tool that builds apps with HTML, CSS, JavaScript, and Web APIs, along with frameworks like jQuery Mobile, Backbone.js, or Ionic. A PhoneGap application is essentially a collection of HTML pages wrapped in a native app shell, which are then pushed out to native platforms via native APIs.
With PhoneGap, developers create files in HTML, CSS and JavaScript—much like they would when creating a website. These files are stored in a local directory or in the cloud, then when they’re run on a device, they access device features through plugins. This makes PhoneGap apps lighter-weight and highly reusable, but they have less of a native feel, and the quality of the UI is going to depend more on the Web View engine of the operating system rendering it—e.g., iOS UIWebView class, or Android’s android.webkit.WebView.
PhoneGap Basics
- Programming languages: HTML5, CSS, JavaScript
- Platforms: iOS, Android, Windows Phone, Blackberry
- Device API access: Limited. HTML5 geolocation, camera, and local database access, plus device API access (such as camera and geolocation) in the PhoneGap Developer App. Does have Web Standard support.
- Free or paid: Open source. Has a free plan or a paid plan that offers increased data and plugin access.
- User Interface: Web UI, and more general—not a native look and feel. Native features can be added, but you’ll need to have resources and knowledge of Java/Swift.
- Augmented reality: Wikitude’s augmented reality Cordova plugin allows developers to build apps that can detect images or locations and project 2D images or 3D models.
- PhoneGap Enterprise: Enterprise-level platform for building more robust apps, with integrated marketing support.
- Companies using PhoneGap: Sony, Mozilla, Intel, IBM, SworkIt, TripCase, and Untappd.
More to consider about PhoneGap:
Access to a library of Cordova plugins. Plugins are bits of add-on code that allow you to do more with your app by providing a JavaScript interface to native components. Plugins allow an app to use native device capabilities. There are plugins contributed by the community for everything from file transfer and geolocation to cameras and push notifications.
The PhoneGap Developer app. This is a paired desktop and mobile app setup that allows developers to work locally on apps with built-in access to device APIs. PhoneGap Desktop 4.0 supports PhoneGap template and lets you build apps with features like push notifications without requiring the command line.
Extend your app with templates and third-party tools. HTML5 templates for PhoneGap provide you with shells for your UI, with features like buttons, menus, transitions, text boxes, and more. In addition, tools from providers like Paypal, Amazon and Magento give you access to things like payment, drag-and-drop design, authentication, and theme builders.
Support for Creative SDK plugins. This allows developers to add native components to apps without having to write a line of Objective-C, Java, or any other native code.
Very low barrier to entry. Most developers have a grasp of HTML, CSS and JavaScript, so it’s relatively easy to get started with PhoneGap as it uses these basic web technologies.
Build and compile in the cloud. PhoneGap Build is a cloud-based app building platform that compiles HTML, CSS and JavaScript to native code without needing to install SDKs for each platform.