• Stars
    star
    1,999
  • Rank 23,176 (Top 0.5 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created almost 12 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PhoneGap Developer App

PhoneGap Developer App Build Status

Available in an app store near you!

Overview

The PhoneGap Developer app is a testing utility for web developers and designers using the PhoneGap framework. After installing the PhoneGap Developer app you can connect to your PhoneGap desktop app to instantly view and test your project on the device.

For more information, see Developer App Reference Guide on the PhoneGap Docs.

Download

Documentation

Development

Setup

The repository includes everything required to compile the app. You can get setup by:

$ git clone https://github.com/phonegap/phonegap-app-developer.git
$ cd phonegap-app-developer/
$ npm install

Compile and Run

The app bundles the phonegap npm module as a dependency. This means that there is no need for a global installation of phonegap or cordova. By editing the package.json, you can specify the exact version of phonegap to compile the project.

Since a global install of the phonegap module is not required, we use npm run scripts to compile and run the application. This allows the app's platforms/ and plugins/ directories to be removed and rebuilt each time, ensuring a consistent build using the correct PhoneGap, Cordova, platform, and plugin versions.

The command structure is:

$ npm run phonegap -- <command> [args]

For example, you can check the version of phonegap:

$ npm run phonegap -- --version

You can compile and run iOS or Android:

$ npm run phonegap -- run ios
$ npm run phonegap -- run android

For developers wishing to use the platform SDKs (Xcode, Eclipse, Visual Studio), please build once with the CLI to correctly populate the platform assets:

$ npm run phonegap -- build <platform>

Due to a Windows npm bug, the -- does not work. Therefore we have created run script that will build Windows Phone 8, so it can run in Visual Studio.

$ npm run phonegap-wp8

Running the Tests

There are two types of test targets: the local app and served app.

Test the Local Application

The local application is the PhoneGap Developer App. To test the local functionality, we build the application with mobile-spec. This allows us to ensure that each plugin was correctly installed. Eventually, we would like to add functional tests for the app logic.

You can run the local tests with:

$ npm run phonegap -- run android --test
$ npm run phonegap -- run ios --test

Again for Windows Phone, we have a run script that will build the app so it can run in Visual Studio.

$ npm run phonegap-wp8-test

Test the Served Application

The served application is the app served by the CLI. To test the server functionality, we serve an instance of mobile-spec. We can then use the manual and automatic tests to ensure that the server provided the correct version of Cordova, the plugins, and the navigation logic.

You can run the served tests with:

$ cd tests/
$ phonegap serve
# now connect with the latest build of the PG App

Updating the Tests

It's as easy as a copy and paste.

  1. Copy all content of cordova-mobile-spec
  2. Paste the content into tests/www

On your first run of the tests, you may see some modified files. This is expected because the test runner invoked by --test modifies certain files to support our app's configuration.

Adding Custom Plugins

If you're a developer interested in creating your own custom build of the PhoneGap Developer App, then this section is for you!

Since the PhoneGap Developer app bundles phonegap as a npm dependency and treats the platforms/ and plugins/ as artifacts, you'll find that it is very easy to add your own plugins and alter other aspects of the app.

You may visit the PhoneGap docs for a more in-depth guide or follow the steps below.

First, Setup the project on your local system.

Second, edit the config.xml to add a custom plugin, change a preference, or configure the app's name. You should also change the app's id to your own unique app bundle id:

<?xml version='1.0' encoding='utf-8'?>
<widget id="org.mycompany.phonegap.app" version="1.6.2" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">

Third, follow the Compile and Run section to get the app onto your device.

If you run into any problems, feel free to submit an issue.

Releases

Releases are also generated using the npm scripts:

$ npm run release-android
$ npm run release-ios
$ npm run release-wp

In order to properly code-sign Android and iOS, you must setup the signing key. This is accomplished by cloning the signing key repository and sym-linking each platform directory with the PhoneGap Developer App repository:

# in your development directory
$ git clone https://github.com/phonegap/phonegap-app-developer-keys.git

$ cd path/to/phonegap-app-developer/
$ ln -s /path/to/phonegap-app-developer-keys/keys/ios resources/signing/ios
$ ln -s /path/to/phonegap-app-developer-keys/keys/android resources/signing/android

Contributing, Commits, and Tags

See the CONTRIBUTING.md file for details.

More Repositories

1

phonegap-start

PhoneGap Hello World app
JavaScript
3,427
star
2

phonegap-plugin-push

Register and receive push notifications
Java
1,941
star
3

phonegap-plugin-barcodescanner

cross-platform BarcodeScanner for Cordova / PhoneGap
Objective-C++
1,271
star
4

phonegap-app-desktop

PhoneGap Desktop App
JavaScript
841
star
5

phonegap-cli

PhoneGap and PhoneGap/Build command-line interface
JavaScript
492
star
6

phonegap-plugin-contentsync

Download and cache remotely hosted content
C
206
star
7

phonegap-plugin-fast-canvas

Fast, 2D, mostly-HTML5-canvas-compatible rendering surface for Android.
C
195
star
8

phonegap-mobile-accessibility

PhoneGap plugin to expose mobile accessibility APIs.
JavaScript
145
star
9

phonegap-docs

PhoneGap Documentation
Pug
121
star
10

build

This is the public repository for PhoneGap Build source and bug tracking
92
star
11

phonegap-community

PhoneGap Community Release Notes
81
star
12

phonegap-template-react-hot-loader

PhoneGap Template using React, ES2015, Webpack, and hot module reloading
JavaScript
79
star
13

phonegap-template-hello-world

PhoneGap Hello World app
JavaScript
72
star
14

node-phonegap-build-api

Node.js REST Client for the PhoneGap Build API
JavaScript
62
star
15

connect-phonegap

Stream a PhoneGap app to any device.
JavaScript
61
star
16

phonegap-app-star-track

The PhoneGap media example app
CSS
54
star
17

phonegap-plugin-pwa

A plugin to provide progressive web app API's
45
star
18

phonegap-template-framework7

A starter template for creating a hybrid app with Framework7.
CSS
43
star
19

phonegap-app-anyconference

AnyConference example app
JavaScript
41
star
20

phonegap-2-style-3

PhoneGap 3.0 project that includes all of the plugins by default
JavaScript
39
star
21

phonegap-plugin-local-notification

An implementation of the Web Notifications API for end-user notifications.
Objective-C
38
star
22

phonegap-webview-ios

Native iOS + PhoneGap Template
Ruby
36
star
23

phonegap-plugin-media-stream

JavaScript
34
star
24

phonegap-template-vue-f7-blank

A blank PhoneGap template using Vue.js and Framework7
JavaScript
32
star
25

phonegap-template-vue-f7-tabs

A TabBar PhoneGap template using Vue.js and Framework7
JavaScript
31
star
26

phonegap-symbian.wrt

Symbian WRT implementation of the PhoneGap API
JavaScript
28
star
27

emulate.phonegap.com

Ripple emulation for PhoneGap's JavaScript environment
JavaScript
28
star
28

node-phonegap-build

PhoneGap Build node module to login, create, and build apps.
JavaScript
25
star
29

phonegap-sample-hybrid-ios

A sample application showing a hybrid application with both native and webview components and communication.
Objective-C
24
star
30

phonegap-sample-hybrid-android

Java
22
star
31

phonegap-app-fast-canvas

Example game using phonegap-fast-canvas-plugin
JavaScript
20
star
32

phonegap.github.io

Main pages for phonegap.com hosted on GitHub pages.
JavaScript
20
star
33

phonegap-plugin-multiview

Spawn multiple cordova enabled webviews in one app
JavaScript
18
star
34

phonegap-template-vue-f7-split-panel

A Split View PhoneGap template using Vue.js and Framework7 that degrades to a Panel View on smaller devices
JavaScript
16
star
35

phonegap-plugin-media-recorder

Objective-C
14
star
36

phonegap-plugin-image-capture

JavaScript
11
star
37

build-bot-model

PhoneGap Build Bot 3D model
11
star
38

phonegap-plugin-template

This repo is a template for starting a new plugin.
JavaScript
10
star
39

phonegap-template-push

A sample application for getting started with push notifications
JavaScript
8
star
40

app

The app showcase found at http://phonegap.github.io/app
HTML
7
star
41

app.phonegap.com

Micro-site for the PhoneGap Developer App and PhoneGap Desktop app.
JavaScript
7
star
42

phonegap-app-anyconference-pgday

AnyConference app for PhoneGap Day
JavaScript
7
star
43

phonegap-app-augmented-reality

CSS
6
star
44

phonegap-template-vue-f7-todos-pwa

A Todo's app template with PWA support using Vue.js and Framework7
JavaScript
6
star
45

adobe-creative-sdk-foundation

OBSOLETE - see README
4
star
46

phonegap-roadmap

Upcoming milestones and projects for PhoneGap
4
star
47

native-plugin-sync-demo

Demo of native-plugin-sync
CSS
4
star
48

phonegap-template-blank

A blank PhoneGap app.
HTML
3
star
49

book

http://phonegap.com/book/
HTML
3
star
50

workshop-plugins

Workshop / lab content covering end to end plugin development
3
star
51

phonegap-plugin-multidex

Enable multidex in a Apache Cordova/PhoneGap application
3
star
52

tool

A collection of 3rd party tools for PhoneGap development.
HTML
3
star
53

cordova-android

DO NOT DELETE - contains the thread-safe bridge code
Java
3
star
54

phonegap-app-stockpile

n. - A storage pile accumulated for future use
JavaScript
3
star
55

phonegap-day

The website for PhoneGap Day
JavaScript
2
star
56

phonegap-app-todo

JavaScript
2
star
57

linting-and-editorconfig

Reference repo for eslint (and other linters) as well as editorconfig settings and info
JavaScript
1
star
58

topcoat-preact

React components implementing Topcoat components
JavaScript
1
star
59

phonegap-template-webvr

PhoneGap template for the WebVR Boilerplate at https://github.com/borismus/webvr-boilerplate
JavaScript
1
star
60

dotfiles

A repo to collect the dot files we use consistently in our other repositories
1
star
61

phonegap-plugin-developer-mode

Utility functions for the Phonegap Developer app
JavaScript
1
star