Search code examples
cordovavisual-studio-2017tools-for-apache-cordova

How can I find the correct version of a plugin for a platform


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


Solution

  • 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