cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leroy van Engelen (JIRA)" <>
Subject [jira] [Commented] (CB-9248) In config.xml, <plugin> inside <platform> is not supported
Date Tue, 30 Jun 2015 09:49:04 GMT


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:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message