[ https://issues.apache.org/jira/browse/CB-10663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Darryl Pogue updated CB-10663: ------------------------------ Component/s: (was: cordova-common) cordova-windows > Difficult to add DeviceCapability for plugin so that it works for Win 10 and > also 8.1 > ------------------------------------------------------------------------------------- > > Key: CB-10663 > URL: https://issues.apache.org/jira/browse/CB-10663 > Project: Apache Cordova > Issue Type: Improvement > Components: cordova-windows > Reporter: Tim Barham > Assignee: Tim Barham > Priority: Major > Labels: triaged, windows > > (windows platform) > When defining device capabilities for a plugin on the Windows platform, the > {{m2}} namespace is required when targeting Windows 8.1: > {noformat} > <config-file target="package.appxmanifest" parent="/Package/Capabilities"> > <m2:DeviceCapability Name="bluetooth.genericAttributeProfile" /> > </config-file> > {noformat} > However, that namespace isn't valid for the Windows 10 Universal project's > {{appxmanifest}} file, where no namespace should be specified for these > elements. > It is possible to work around this by using the new {{versions}} attribute > added in Cordova 5.0.0: > {noformat} > <config-file target="package.appxmanifest" parent="/Package/Capabilities" > versions="<10.0.0"> > <m2:DeviceCapability Name="bluetooth.genericAttributeProfile" /> > </config-file> > <config-file target="package.appxmanifest" parent="/Package/Capabilities" > versions=">=10.0.0"> > <DeviceCapability Name="bluetooth.genericAttributeProfile" /> > </config-file> > {noformat} > However, that becomes very messy and error-prone when there are lots of > entries (and will also completely break the build on Cordova versions prior > to 5.0.0). > It would be nice if we could somehow handle this automatically (for example, > check for the {{m2}} namespace when adding elements to the Windows 10 > {{appxmanifest}} and remove it). -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org