[TIMOB-23261] Windows: Error when adding capabilities in wrong order
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-06-27T00:32:01.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.0.0 |
Components | Windows |
Labels | n/a |
Reporter | Rene Pot |
Assignee | Gary Mathews |
Created | 2016-04-21T14:46:57.000+0000 |
Updated | 2016-09-05T16:45:05.000+0000 |
Description
When I have capabilities in this order:
<windows>
<manifest>
<Capabilities>
<Capability Name="internetClient"/>
<DeviceCapability Name="location"/>
<Capability Name="picturesLibrary" />
<DeviceCapability Name="webcam" />
</Capabilities>
</manifest>
</windows>
I get an error:
[ERROR] : C:\Users\Rene\.titanium\vsbuild\Roamler\phone.x86\Release\AppxManifest.xml(48,6): error APPX1404: File content does not conform to specified schema. The element 'Capabilities' in namespace 'http://schemas.microsoft.com/appx/2010/manifest' has invalid child element 'Capability' in namespace 'http://schemas.microsoft.com/appx/2010/manifest'. List of possible elements expected: 'DeviceCapabilityChoice, DeviceCapability' in namespace 'http://schemas.microsoft.com/appx/2010/manifest' as well as 'DeviceCapability' in namespace 'http://schemas.microsoft.com/appx/2013/manifest'. [C:\Users\Rene\.titanium\vsbuild\Roamler\phone.x86\Roamler.vcxproj]
[ERROR] : C:\Users\Rene\.titanium\vsbuild\Roamler\phone.x86\Release\AppxManifest.xml(48,6): error APPX1404: File content does not conform to specified schema. The element 'Capabilities' in namespace 'http://schemas.microsoft.com/appx/2010/manifest' has invalid child element 'Capability' in namespace 'http://schemas.microsoft.com/appx/2010/manifest'. List of possible elements expected: 'DeviceCapabilityChoice, DeviceCapability' in namespace 'http://schemas.microsoft.com/appx/2010/manifest' as well as 'DeviceCapability' in namespace 'http://schemas.microsoft.com/appx/2013/manifest'. [C:\Users\Rene\.titanium\vsbuild\Roamler\phone.x86\Roamler.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:17.70
However, when I put them in this order all works fine:
<windows>
<manifest>
<Capabilities>
<Capability Name="internetClient"/>
<Capability Name="picturesLibrary" />
<DeviceCapability Name="location"/>
<DeviceCapability Name="webcam" />
</Capabilities>
</manifest>
</windows>
This sounds like a bug
Hello, This could be windows default behavior. As in https://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx It's clear that you need to define General-use capabilities first then Device capabilities and after that Special-use capabilities. This should be the idle case. Regards, Sharif.
Would be good functionality to add to Titanium to prevent issues like this
This may be an error stemming from Windows/MS tooling itself, but there's no reason we have to make our users deal with crappy experience like this. We already do some filtering/manipulation of capabilities for them, so we should also just order them properly under the covers to prevent this.
master: https://github.com/appcelerator/titanium_mobile_windows/pull/753
Verified using: OS: Microsoft Windows 10 Pro 10.0.14393 Appc core: 6.0.0-38 Appc NPM: 4.2.8-6 Ti SDK: 6.0.0.v20160904203840 Incorrect order of capabilities no longer causes an error in the build process Closing ticket