cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Scafidi-McGuire <>
Subject Duplicate plugin preferences - any docs on config/defaults xml mechanisms
Date Mon, 14 Apr 2014 13:57:15 GMT
We're using cordova to build for iOS & Android and we struggle with a few issues with the
defaults/config mechanisms for plugin preferences.  Perhaps we just don't understand how it's
meant to be used or perhaps we've uncovered a bug.  These first two issues lead us to the
problem I'm writing about.

We can't put custom preferences in the shared config file that have a copy in the defaults.xml,
because both end up in the generated config file.  It seems like preferences shouldn't be
repeated in the generated config file whether they contradict each other or not.  It seems
like any preference or attribute in the shared config should override one found in the defaults.xml.

We don't want to put platform-specific preferences in the shared config.xml file because it'll
end up in the config files for both platforms.  Although we could leave them in there cluttering
the final generated config file, we'd rather not.  The fact that we already have to edit the
defaults.xml files to solve the previous problem led us to this solution.  We put all shared
values in the shared config.xml and any platform specific settings in the respective defaults.xml.

That worked well for us until we upgraded.  It seems as part of the upgrade, the defaults.xml
files were all cleared.  After uninstalling & reinstalling each plugin (no plugins update?),
the defaults.xml files were full of defaults and our custom settings were all gone.

So what are we missing?  Is there any documentation on the most effective use of these files?

If we leave custom preferences in the shared config.xml, how do we prevent duplication/competition
with the copies in defaults.xml?

Is there yet another place for platform specific settings?  Is there anyway to prevent nuking
the defaults.xml when upgrading?

MattDuplicate plugin preferences - any docs on config/defaults xml mechanisms

Matt Scafidi-McGuire | Senior User Interface Developer<>


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message