cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Higgins <>
Subject Re: Duplicate plugin preferences - any docs on config/defaults xml mechanisms
Date Mon, 14 Apr 2014 14:09:37 GMT
Sounds like a bug if two preferences of the same name end up in the
platform config.xml. I would encourage you to log this in our JIRA system:

Platform specific preferences can be specified using the platform element,
which I recently discovered was undocumented.;a=blobdiff;f=docs/en/edge/config_ref/;h=9c32672403f1ceffce4278aa7e1fa6add7065946;hp=2df993147957cfe6f626f8a08e4a455557889e4d;hb=7598207d0e4395905c009c056947a5a7c9930b1a;hpb=b28cb8be613f637f28dbfd3c0db2bd193e7abb51

On Mon, Apr 14, 2014 at 9:57 AM, Matt Scafidi-McGuire <> wrote:

> 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?
> Thanks,
> 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