cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Bocanegra <>
Subject [DISCUSS] Local plugin configuration
Date Wed, 26 Aug 2015 05:13:26 GMT

I noticed that the current way to configure plugin behaviour is done
through the <preference/> tags in config.xml. The cordova plugin
registry shows 1106 plugins, so the chance that 2 plugins have a
preference name collision is relatively high.

I suggest that plugins could be configured in the <feature/> tag and
that plugins have a possibility to read their config.

so analog to the platform tag, we could specify plugin local preferences.


<feature name="File">
  <param name="ios-package" value="CDVFile" />
  <param name="onload" value="true" />
  <preference name="extraFilesystems" value="library" />


    <feature name="SplashScreen">
        <param name="ios-package" value="CDVSplashScreen" />
        <param name="onload" value="true" />
        <preference name="image" value="...resource name..."/>
        <preference name="autoHide" value="true"/>

analog to the required global preference, a plugin can specify a
required local preference in its plugin.xml description. eg

   <feature-preference name="image" />

Similar it should be possible to configure the plugin in the
non-platform config.xml, inside the plugin tag. eg:

<plugin name="cordova-plugin-splashscreen" spec="~2.1.0">
        <preference name="image" value="...resource name..."/>
        <preference name="autoHide" value="true"/>

and on updating the platform, it should copy those preferences into
the <feature> tags.

Regards, Toby

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

View raw message