App testing with the PhoneGap Developer App — see your changes instantly without re-building!


With this software, you can develop your app on the desktop, then see the changes instantly on your mobile device. There’s no need to re-sign, re-compile, or reinstall your app to test your code. You’ll have access to the device APIs that aren’t available in web browsers. Let’s give it a spin!

For more info:
http://phonegap.com/blog/2014/04/23/phonegap-developer-app/ 

PhoneGap Developer App Setup

1. This article assumes you already have a fully functioning PhoneGap environment, including Node.js. If not, please look elsewhere on this site for full installation instructions.

2. In Terminal, install the phonegap software:

sudo npm install -g phonegap

3. Download and install the mobile app to your test device (search for “Developer App”):
iOS: https://itunes.apple.com/app/id843536693
Android: https://play.google.com/store/apps/details?id=com.adobe.phonegap.app

4. In Terminal, change directories to the directory you want to hold your project. (Type cd in the terminal, drag the containing folder to the terminal screen, click anywhere in the terminal screen to activate it, and hit Enter.) Create your app:

phonegap create myApp

5. Change to your project’s directory:

cd myApp/

6. Start mirroring the app on your device:

phonegap serve

7. Open your PhoneGap app in the device. (The following steps will work only if your computer and device were on the same network. In my case at work, IT kept them separate for security reasons. So after the screen appeared in the device, I get ERROR! and TIMED OUT! messages.)

8. Note the server address in the Terminal, tap the server address box in the PhoneGap app, and type it in. Then tap Connect on the device. You should see “Connecting…” flash, then your app’s home screen appear.

9. Go back to your assets and make changes. In this case, replace the text in the <h1></h1> tag in the index.html page, and save. Back in the device, tap the screen with four fingers to update.

Reporting Problems

This app is still under development. If you find any problems, post them here (requires registration):

https://github.com/phonegap/phonegap-app-developer/issues

Updating

You can update to the latest version with:

npm update -g phonegap

Phonegap Help

Typing “phonegap help” in the terminal gives these available commands and options:

Usage: phonegap [options] [commands]

Description:

PhoneGap command-line tool.

Commands:

create <path> create a phonegap project
 serve serve a phonegap project
 build <platform> build a specific platform
 install <platform> install a specific platform
 run <platform> build and install a specific platform
 local [command] development on local system
 remote [command] development in cloud with phonegap/build
 platform [command] update a platform version
 plugin [command] add, remove, and list plugins
 help [command] output usage information
 version output version number

Options:

-d, --verbose allow verbose output
 -v, --version output version number
 -h, --help output usage information

Platforms:

keyword | local environment | remote environment
 -------------------|---------------------|-------------------
 android | Yes | Yes
 ios | Yes | Yes
 wp8 | Yes | Yes
 Blackberry 10 | Yes | No

Examples:

$ phonegap help create
 $ phonegap help remote build
 $ phonegap create path/to/my-app
 $ phonegap remote build android

Typing “phonegap help remote” in the terminal returns:

Usage: phonegap remote [command]

Description:

Executes the command remotely using the cloud-based PhoneGap/Build service.

Commands:

login login to PhoneGap/Build
logout logout of PhoneGap/Build
build <platform> build a specific platform
install <platform> install a specific platform
run <platform> build and install a specific platform

Examples:

$ phonegap remote login
$ phonegap remote build android
$ phonegap remote run android
Advertisements

One thought on “App testing with the PhoneGap Developer App — see your changes instantly without re-building!

  1. Pingback: Setting Up Your Developmemt Environment for Cordova/PhoneGap Android projects | iPhone Dev Log

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s