Hi,
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.
eg:
<feature name="File">
<param name="ios-package" value="CDVFile" />
<param name="onload" value="true" />
<preference name="extraFilesystems" value="library" />
</feature>
or
<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"/>
</feature>
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"/>
</plugin>
and on updating the platform, it should copy those preferences into
the <feature> tags.
WDYT?
Regards, Toby
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]