0

The documentation for changing the CLI version of your Visual Studio Tools for Apache Cordova project states that:

Plugins are tested against a specific version of each Cordova platform [...] In a sense, it's tied to that version of the Android platform

So let's say I want to upgrade my cordova-android platform to version 7.1.0.

Where can I find out what version of the plugins I'm using have been tested against that version of the platform?

The most significant plugins I'm using are the camera and file plugins

Colin
  • 22,328
  • 17
  • 103
  • 197

1 Answers1

1

That statement is no longer true, the plugins used to be pinned to the platform/CLI versions, but not anymore.

Nowadays, a well-configured plugin specifies any restrictions about the CLI or platform versions required in "engines" tags/entries in the plugin.xml and package.json files. So when you install them, they can fail to install or install a previous version compatible with your current platform/CLI.

So, basically install from npm with cordova plugin add command, and you should get latest version compatible with your current platforms/CLI

Colin
  • 22,328
  • 17
  • 103
  • 197
jcesarmobile
  • 51,328
  • 11
  • 132
  • 176
  • The way this is written, it suggests that I need to ensure that my platform/CLI is well configured. How do I do that? – Colin Mar 16 '18 at 09:34
  • Don't understand what you mean. CLI has a platform pinned, install the CLI to the version you want to use and add the platform, it will use the one that has been tested for that CLI. Then install the plugin from NPM and it should install the correct version for your CLI/platform – jcesarmobile Mar 16 '18 at 09:44
  • Does the "it" in "(if it's well configured)" in your answer refer to the plugin then? i.e. if the plugin is properly configured, the CLI will install the compatible version or report why a compatible version can't be installed – Colin Mar 16 '18 at 10:03
  • yeah, it refers to the engines entries in plugin.xml and package.json, some developers don't configure them (because they don't know or don't care). But core plugins should be ok (unless a mistake was made) – jcesarmobile Mar 16 '18 at 10:06
  • That's great. I hope you don't mind, I've edited your answer to make that a bit clearer. You might be interested in taking a look at my other question here: https://stackoverflow.com/q/49319304/150342 – Colin Mar 16 '18 at 11:16