[cordova] Is there a difference between PhoneGap and Cordova commands?

I just installed Phonegap for the first time and just browsed through the docs. What confuses me is the fact that some docs are using the command "phonegap" and some "cordova".

Android platform guide:

$ cordova create hello com.example.hello "HelloWorld"

Command Line Interface guide tells:

$ phonegap create hello com.example.hello HelloWorld

Is there a difference between those two commands (resulting in different files and folder structures) or are they just aliases for the same thing?

This question is related to cordova cordova-cli

The answer is


they re both identical, except that phonegap cli can help you build your application on PhoneGap Build. My suggestion is to use the cordova CLI if you don't use the PhoneGap build service.


Late answer but I think this might be useful.

There are differences between the two cli, phonegapis a command that encapsulates cordova. In the create case the only difference is an overriden default app

In some other cases the difference is much more significant. For instance phonegap build comes with a remote build functionality while cordova build only supports local builds.

A big limitation I found to PhoneGap is that, AFAIK, you can only build a release APK using the PhoneGap Build service. On Cordova you can build with cordova build android --release.


Now a days phonegap and cordova is owned by Adobe. Only name conversation was different. For install plugin functionality , we should use same command for phonegap and cordova too.

Command : cordova plugin add cordova-plugin-photo-library

Here,

  • cordova - keyword for initiator
  • plugin - initialize a plugin
  • cordova plugin photo library - plugin name.

You can also find more plugin from https://cordova.apache.org/docs/en/latest/


Above, Abhishek mentions the command line differences specified in two URLS:

  1. PhoneGap: http://docs.phonegap.com/en/edge/guide_cli_index.md.html

  2. Cordova: http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface

One thing to point out is that, as of this post, the phonegap one looks to be almost the same as the cordova one, and is probably not an accurate image of the command line option differences. As such, I installed both on my system so I could look at the differences.

These are just a few of them. Hopefully they are brought more in sync sometime. If anyone has better information, please tell me.

  1. Adding platforms seems to be done differently between the two commands ( phonegap uses "install" command, cordova uses "platform add" command )
  2. Adding/creating projects seems to be the same between the two commands ( same command line options supported )
  3. Obviously, as has been stated, phonegap can use PhoneGap Build, so it has the corresponding options to trigger that or local builds
  4. Quite a few other significant command line differences, simply by running "cordova help" and "phonegap help" and comparing the two.

I guess my point is that the phonegap CLI documention mentioned quite often is not really for the phonegap CLI, but for the cordova CLI, at this time. Please tell me if I am missing something. Thanks.


Here are differences that I have discovered:

I am comparing the phonegap 3.3.0-0.18.0 CLI to the functionality described in the cordova 3.3.0 documentation for that CLI.

  1. "ls" is an option for "cordova plugin" but not for "phonegap plugin". You must use "list" instead. e.g.: "phonegap plugin list"

  2. "serve" is not documented in "phonegap -help" but it does exist and it does work. It will not find and load phonegap.js so the pages never fully load but it still does provide some value. I'm not sure if this is different than the behavior cordova.

  3. "phonegap platform add " does not work in phonegap. You must do a "phonegap build " to add support for a platform.

Note that you may also experience some confusing error messages in phonegap where the suggested solution refers to using the cordova command.


This first choice might be a confusing one but it’s really very simple. PhoneGap is a product owned by Adobe which currently includes additional build services, and it may or may not eventually offer additional services and/or charge payments for use in the future. Cordova is owned and maintained by Apache, and will always be maintained as an open source project. Currently they both have a very similar API. I would recommend going with Cordova, unless you require the additional PhoneGap build services.


From what I've read (and please correct me if Im wrong):

Phonegap claim that they started trying to make this but couldn't, so they passed it to the Apache Software Foundation.

Apache in their awesomeness (Long live Apache) fixed it, developed it, and made it supremely awesome.

Now Phonegap are trying to maintain and enhance a copy they took back, but keep stuffing it up.

So, by my thinking, I want a solid and trustworthy dev platform made by seasoned professionals that I can trust, rather than a patched upon sub-version of said. Therefore Id say I am a Cordova developer NOT a Phonegap developer.

Iv also read that in a second desperate attempt to gain popularity and control over the great works of Apache, Phonegap has now been sold under the Adobe flag. You know Adobe, they are the guys who do nothing for free and are so bad at maintaining software life-cycles that their apps need to perform updates every time you blink, and for some reason each of their apps are about 100 times the size you would expect.

I guess that is the summary of my research if I didn't read it wrongly.

And if true, then lets all drop this whole Phonegap nonsense and just stick with Cordova.


I have also noticed that cordova has a "serve" command that Phonegap doesn't. This command launches a local server on port 8000. This is handy for running your app in Chrome and using the Ripple emulator.


I found this difference which forced me to use a mixed bag of phonegap and cordova cli commands when building my app:

'phonegap plugin add' couldn't handle command line parameters correctly, whereas 'cordova platform add' works flawlessly

The command I use is:

'cordova plugin add https://github.com/crittercism/PhoneGap.git --variable IOS_APP_ID="[my_license_key]"

Note I am using phonegap 3.5