[ https://issues.apache.org/jira/browse/CB-9248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14608046#comment-14608046 ]
Leroy van Engelen commented on CB-9248: --------------------------------------- Thanks for clarifying the way Cordova plugins are meant to work. It might be a good idea to mention in the `config.xml` documentation that `<platform>` does not apply to plugins. Currently it says: > When using the CLI to build applications, it is sometimes necessary to specify > preferences or other elements specific to a particular platform. Use the > <platform> element to specify configuration that should only appear in a > single platform-specific config.xml file. For us, most reasons to have different plugin dependencies per platform is because we use Phonegap Build (PGB). PGB currently provides the following platform versions with `phonegap-version` set to `cli-5.1.1` (taken from the defaults installed by cordova cli 5.1.1): Android: 4.0.2 iOS: 3.8.0 wp8: 3.8.1 Now, these issues come up: The `cordova-plugin-whitelist` plugin does not support iOS platform <= 4 (and I suspect it does not support any platform version <= 4). Therefore we only add it on Android The latest `cordova-plugin-file-transfer` on wp8 (1.2.0) uses an API that is only available in `master` on `apache/cordova-wp8`, so we need to depend on an older version The `com.phonegap.plugin.statusbar` plugin only works on iOS, so we need to exclude it for other platforms. There are other statusbar plugins (e.g. cordova-plugin-statusbar) but we would need to do a retest with that. So the main issues are that the choice of default platform versions on PGB is a bit unfortunate for us and that new versions of plugins can depend on unreleased versions of a platform > In config.xml, <plugin> inside <platform> is not supported > ----------------------------------------------------------- > > Key: CB-9248 > URL: https://issues.apache.org/jira/browse/CB-9248 > Project: Apache Cordova > Issue Type: Bug > Components: CLI, CordovaLib > Affects Versions: 5.1.2 > Reporter: Leroy van Engelen > Assignee: Rob Paveza > > In config.xml it is possible to define plugins that should be installed using > the <plugin> tag. Some plugins are not available or are buggy on certain > platforms. Therefore we need to include them depending on the platform. I > would expect this to be possible by wrapping them in <platform> tags, but > these are ignored. > The problem is that in `cordova-lib/src/configparser/ConfigParser.js` the > methods `getPluginIdList` and `getPlugin` only top level <plugin> definitions > are taken into account. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org