Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Dreamweaver Developer Center /

Packaging web apps as mobile apps using PhoneGap and Dreamweaver

by Jon Michael Varese

Jon Michael Varese
  • www.jmvarese.com

Content

  • System requirements
  • Set up the sample application site
  • Configure the application framework
  • Specify native application settings
  • Build and emulate the mobile app
  • Where to go from here

Created

3 May 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Android application Dreamweaver CS5.5 iOS jQuery mobile PhoneGap

Requirements

Prerequisite knowledge

None, though basic knowledge of Dreamweaver site setup, HTML, CSS, as well as how mobile apps work on smart phones and tablets would be helpful.

User level

All

Required products

  • Dreamweaver (Download trial)

Sample files

  • meridien_mobile.zip

Dreamweaver CS5.5 now includes integration with PhoneGap—an open-source development framework for building mobile apps. The integration between the two is seamless, and you do not need to know anything about PhoneGap to take advantage of its functionality.

The Dreamweaver/PhoneGap integration lets you quickly deploy your web applications as native apps for Android- and iOS-based mobile devices. (A native application is one written to run on a specific operating system/device.) The PhoneGap framework acts as an API bridge between web applications and mobile devices. It helps you wrap web applications within mobile apps, even if you aren't familiar with coding languages such as Objective-C or Cocoa.

This tutorial shows you how to package an existing mobile app built in Dreamweaver. It does not show you how to build that application from scratch, nor does it show you how to deploy the packaged application on a mobile device. Those topics will be covered in other tutorials, scheduled for later publication.

Note: The mobile application you package with Dreamweaver is an application for debugging purposes only. The application will run in the Android and iOS emulators, or on your personal mobile device if you make the transfer, but you cannot upload the debug mobile apps to the Apple and Android stores. In order to upload iOS or Android apps, you must take the additional step of signing them outside of Dreamweaver. For more information about uploading applications to the Apple and Android stores, see the Android documentation, or the Program User Guide on the Apple iOS Provisioning Portal. (Before you can access the Apple iOS Provisioning Portal you must register with the Apple Developer Program [free] and enroll in the iOS Developer Program [annual fee].)

System requirements

You must ensure that you meet the following system requirements before you can proceed with this tutorial.

MAC OS - iOS

  • Mac OS X Snow Leopard version 10.6.x or later
  • Xcode 3.2.x with the iOS SDK (You'll download this during the tutorial.)

MAC OS - Android

  • Mac OS X 10.5.8 or later (x86 only)
  • Android SDK (You'll download this during the tutorial.)

Windows - iOS

  • iOS is only available for users with an Apple computer

Windows - Android

  • Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit)
  • Android SDK (You'll download this during the tutorial.)

Set up the sample application site

This tutorial uses a sample application to demonstrate native application packaging. The application is for Meridien 24/7—a fictional native application that lets you locate local restaurants on your mobile device.

Before you begin learning how to package the application, you need to install the sample files and set up a Dreamweaver site.

  1. Download the sample zip, meridien_mobile.zip, unzip the file, and save it somewhere on your computer. I like to save all of my Dreamweaver sites in a central folder called Sites, located on my Windows C-drive.
  2. Start Dreamweaver, and choose Site > New Site.
  3. In the Site Name text box of the Site Setup dialog box, enter the name for the new site: Meridien.
  4. In the Local Site Folder text box, enter the path to the meridien_mobile folder that you saved on your computer in step 1. You can click the folder icon to the right of the text box to navigate to the meridien_mobile folder.
  5. When you're finished, click Save to close the Site Setup dialog box.

    The Dreamweaver Files panel populates with the files of your new site (see Figure 1).

The Dreamweaver Files panel with files for the new Meridien 24/7 site.
Figure 1. The Dreamweaver Files panel with files for the new Meridien 24/7 site.

    The meridien_mobile folder contains all of the files for the web application, including the required JavaScript, CSS, and image files.

  1. Double-click the index.html file in the Files panel to open it in the Document window. You do not actually need to have the index file open to package your application; we're just opening the file so that you can see what the application looks like, and how it works.
  2. You won't see much in the Document window because Dreamweaver doesn't render the live application by default. Click the Live View button in the Document toolbar to see what the application looks like on a device or in a browser.
  3. (Optional) You can play around with different window sizes for the application by selecting different options from the Window Size menu in the Status bar (lower-right corner of the Document window).

    The Window Size menu lets you see what the current page will look like in different devices (such as smart phones and tablets).

The Window Size menu.
Figure 2. The Window Size menu.

Again, you don't need to do any of this to package your application. This step just lets you see how the application might look in different devices.

Configure the application framework

Packaging a web application in Dreamweaver requires the iOS SDK (for iOS devices) and the Android SDK (for Android devices). Among other things, the iOS and Android SDKs let you run device simulators. The device simulators let you see what your application will look like on a mobile device, without having to test the application on an actual device.

Just to be clear, you do not need both SDKs to package web applications. You need the iOS SDK if you want to create apps for iOS devices, and you need the Android SDK if you want to create apps for Android devices.

Android

  1. Choose Site > Mobile Applications > Configure Application Framework.
  2. Click Easy Install, and then select a location for the Android SDK installation. The location can be anywhere on your computer (though Adobe recommends that you do not install the SDK to your site directory).

Note: If the Easy Install fails, please see tech note 90408.

Note: The installation does take a little time, so be patient.

The Configure Application Framework dialog box showing the path to the Android SDK (Windows).
Figure 3. The Configure Application Framework dialog box showing the path to the Android SDK (Windows).
  1. After the installation is complete, click Save to close the Configure Application Framework dialog box.

iOS

The iOS SDK installation is a little more involved than the Android SDK installation. First you need to manually download and install the SDK from the Apple iOS Dev Center. Then you need to point to the SDK from within Dreamweaver. Again this feature is only supported on Mac OS X 10.6.x and later.

  1. Choose Site > Mobile Applications > Configure Application Framework.
  2. Click the Apple iOS Dev Center link in the Configure Application Framework dialog box.
  3. On the Apple website, click the Log In button and use your Apple ID to Log in to the Apple iOS Dev Center. You can create an account for free if you are not already a registered user.

Note: At the time of this publication, all steps best describe link paths on the Apple website. However, Adobe has no control over the Apple website, so if Apple makes changes, these instructions might be slightly incorrect.

  1. Once you've logged in, click Downloads. The Downloads link takes you to the bottom of the page.
  2. Click the Download Xcode 4 button to get to the Xcode 4/iOS SDK 4.3 download.
  3. Lastly, download the latest version of Xcode and the iOS SDK. Again, Adobe has no control over the Apple website or its software updates. You just need to be sure to download the latest versions of both Xcode and the iOS SDK.
  4. Once the download is complete, double-click the installer on your computer. Adobe recommends that you install the SDK to the default location: OS X 10.6.x > Developer.
  5. When the installation is complete, return to Dreamweaver. The Configure Application Framework dialog box should still be open.
  6. Click the folder icon next to the iOS Developer Tools Path text box, and navigate to the OS X 10.6.x > Developer folder. (If you installed the iOS SDK to a location other than the default, you'll need to navigate to your custom installation location.)
The Configure Application dialog box showing paths to both Android and iOS SDKs on a Macintosh computer.
Figure 4. The Configure Application dialog box showing paths to both Android and iOS SDKs on a Macintosh computer.
  1. Once the path to the iOS SDK is entered, click Save to close the Configure Application Framework dialog box.

Specify native application settings

Next you'll specify the settings for your mobile app. This is the last step before packaging and testing.

Note: This feature does not support high ASCII or double-byte characters.

  1. Make sure the Meridien site is still open in the Files panel. The site must be open in order for you to package it.

Note: Packaged sites can only include HTML5, CSS, JavaScript, and image files. You cannot package sites with dynamic server-based pages, such as PHP pages.

  1. Choose Site > Mobile Applications > Application Settings.
  2. In the Bundle ID text box of the Native Application Settings dialog box, specify the application's Bundle ID. The Bundle ID is used internally by app stores to identify your application, and takes the form com.company.appname.


    Replace company with your company name, and appname with the name of your app, being careful not to accidentally delete any periods. Dreamweaver auto-populates the appname with your site name, but you can change this if you wish.

    The Bundle ID is not seen by public users of the application.

  3. Next, enter a name for the application (again, Dreamweaver auto-populates this for you with the site name), the name of the application's author, and the application version number.
  4. Click the folder icon next to the Application Icon PNG text box and navigate to the img folder of your meridien_mobile site folder.
  5. Select the icon.png file and click OK. This image is what the application will use as its application icon on the mobile device.

Note: It is not strictly necessary to have the source icon image file contained within the site hierarchy; you can actually select any PNG image on your system. Dreamweaver will take care of the appropriate image scaling, naming, and copying of the file.

  1. If you're on a Macintosh running 10.6.x or later, you also have the option of specifying a startup screen image. Click the folder icon next to the Startup Screen PNG text box, navigate to the img folder of your meridien_mobile site folder, select the splash.png file, and click OK.

Note: It is not strictly necessary to have the source startup screen image file contained within the site hierarchy; you can actually select any PNG image on your system. Dreamweaver will take care of the appropriate image scaling, naming, and copying of the file.

  1. In the Target Path text box, specify the location where you'd like to save the packaged application. For this tutorial, I'm saving mine to my desktop.
  2. Under Select Target OS Version, select the Android or iOS (iPhone/iPod/iPad) versions for which you want to build the application. For this tutorial, you can just accept the default settings.

Note: These menus are prepopulated for you based on the contents of the SDKs you installed earlier.

The completed Native Application Settings dialog box (Windows).
Figure 5. The completed Native Application Settings dialog box (Windows).
The completed Native Application Settings dialog box (Mac OS).
Figure 6. The completed Native Application Settings dialog box (Mac OS).
  1. Click Save to save your settings.

Note: When you click Save, Dreamweaver adds a phonegap.js file to your site. This file is an essential part of the mobile app, and enables code-hinting of PhoneGap APIs. (You might need to click the Refresh button in the Files panel to see this new file.)

Build and emulate the mobile app

Now you're ready to build and emulate the application. The Android and iOS SDKs provide device emulators, so that you can test the mobile app right on your own computer.

  1. Select Site > Mobile Applications > Build and Emulate > Android/iOS.

Note: You can also just select Site Mobile Applications > Build > Android/iOS if you want to build the application without emulating.

  • The appropriate emulator launches and shows you what your application will look like on the actual device. You can interact with the application in the emulator.

Note: The Android emulator may take an extremely long time to load, so be patient. You'll receive a success message that tells you when the application has finished building or installing in the emulator. If the build or emulation process fails, Dreamweaver adds a build log to the application's target folder. (The target folder is the folder you specified in the Target Path text box of the Native Application Settings dialog box). The build log may provide information as to why the build might have failed.

Where to go from here

Soon we'll be publishing links to tutorials that show you how to build the application you just packaged, as well as links to tutorials that will show you how to deploy the application to different mobile devices.

In the meantime, you can consult the following resources for more information:

  • About PhoneGap
  • PhoneGap API Reference
  • jQuery Mobile framework

If you find any other useful links, please post them in the comments section of this tutorial.

Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License+Adobe Commercial Rights

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

More Like This

  • What's new in Dreamweaver CS5.5
  • Introduction to media queries – Part 1: What are media queries?
  • Creating and consuming ColdFusion components and web services with Dreamweaver CS4
  • Packaging widgets with the Adobe Widget Browser
  • Customizable starter design for multiscreen development
  • Introduction to media queries – Part 2: Building a responsive design
  • Creating a multiscreen theme for WordPress using Dreamweaver CS5.5
  • Responsive design with jQuery marquee
  • Developing HTML5 games with Impact JavaScript game engine and Dreamweaver CS5.5
  • Getting started with jQuery Mobile

Tutorials and samples

Tutorials

  • Understanding HTML5 semantics: Changed and absent elements
  • Mobile app with PhoneGap: Submitting to the Apple App Store
  • PhoneGap and Dreamweaver: Releasing on iOS
  • Mobile app with PhoneGap: Submitting to Android Market

Samples

  • Responsive design with jQuery marquee
  • Customizable starter design for jQuery Mobile
  • Customizable starter design for HTML5 video
  • Customizable starter design for multiscreen development

Dreamweaver user forum

More
04/23/2012 Resolution/Compatibility/liquid layout
04/20/2012 using local/testing server with cs5 inserting images look fine in the split screen but do not show
04/18/2012 Ap Div help
04/23/2012 Updating

Dreamweaver Cookbook

More
11/07/2011 Simple social networking share buttons
09/20/2011 Registration form that will generate email for registrant to validate
08/21/2011 Spry Accordion - Vertical Text - Auto Start on Page Load - Mouse Over Pause
08/17/2011 Using cfdump anywhere you like

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement