cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rs22 <>
Subject [GitHub] cordova-windows pull request #186: Fix duplicate capability declarations in ...
Date Fri, 15 Jul 2016 00:24:56 GMT
GitHub user rs22 opened a pull request:

    Fix duplicate capability declarations in Win10 AppxManifest

    I have created an issue for this in Jira:
    Let me describe the issue in more detail - I have this .\testplugin\plugin.xml:
    <?xml version='1.0' encoding='utf-8'?>
    <plugin id="testplugin" version="1" xmlns="">
        <platform name="windows">
            <config-file parent="/Package/Capabilities" target="package.windows10.appxmanifest">
                <Capability Name="enterpriseAuthentication" />
                <Capability Name="sharedUserCertificates" />
    When I run `cordova create app && pushd app && cordova plugin add ..\testplugin
&& cordova platform add windows` the package.windows10.appxmanifest will have the
capabilities set correctly. Now, everytime I run `cordova prepare`, this will duplicate all
the uap-prefixed capabilities:
            <Capability Name="internetClient" />
            <uap:Capability Name="enterpriseAuthentication" />
            <uap:Capability Name="sharedUserCertificates" />
            <uap:Capability Name="enterpriseAuthentication" />
            <uap:Capability Name="sharedUserCertificates" />
    I had a look at how the capability declarations are handled in ConfigChanges.js and AppxManifest.js.
The easiest fix seems to be to just check for duplicated capabilities when writing the AppxManifest
(which is what I've implemented). Another way could be to inject the uap prefixes before applying
the ConfigChanges, so that the capabilities are not being duplicated in the first place.
    Let me know what you think and I'll update the code accordingly.

You can merge this pull request into a Git repository by running:

    $ git pull master

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #186
commit 1e7d3fcf6b6c85dad8b4e1ecd7b9a2739f5e0522
Author: Robert Schmid <>
Date:   2016-07-14T21:50:56Z

    Remove duplicate capabilities when writing the AppxManifest


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

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

View raw message