O'Reilly logo

Beginning iOS Application Development with HTML and JavaScript® by Richard Wagner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 20

PhoneGap: Native Apps from Your HTML, CSS, and JavaScript

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • Creating a PhoneGap project in Xcode
  • Adding your web app code into PhoneGap
  • Tweaking the project to fit your needs

Worlds collide. At least that’s what happens when you use a tool like PhoneGap or one of its competing tools to combine native and web technologies. The solution is actually a quite ingenious solution for web developers: Get around the greatest limitations of an IOS web app by wrapping it in a native shell. The native wrapper enables you to make your app available on the App Store, enables users to install it on an IOS device’s home screen, yet still enables you to keep the application UI and logic in the technology you want to utilize: HTML, CSS, and JavaScript.

In this chapter, I walk you through the steps to transform an IOS web app into a native app using PhoneGap. You don’t have to know any Objective-C to pull it off, though you need to dive into the Xcode IDE to do everything you want to do.

INSTALLING PHONEGAP

If you worked through Chapter 19 already, you have already installed Xcode onto your development computer. If you haven’t, be certain you do that before proceeding because the PhoneGap installer adds an application template to Xcode. Follow these steps:

1. Go to www.phonegap.com and download the latest release of PhoneGap.

2. Extract the contents of the zip file and then navigate to the IOS subdirectory to locate the IOS installer .dmg file.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required