[TIMOB-20231] Windows: Support handling differing capabilities between Windows 8.1/10
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-01-21T17:25:41.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.3.0 |
Components | Windows |
Labels | qe-5.3.0 |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2016-01-13T20:45:24.000+0000 |
Updated | 2016-05-20T18:13:12.000+0000 |
Description
The list of capabilities specified in the appxmanifest has changed from 8.1 to 10. Some of them apply only to one version or the other, and some of the new ones require the tags be namespaced.
Right now our support is basically to allow a passthrough of XML from trap.xml to the manifest to add more capability tags. But I'm not sure if we say use the new
<uap:Capability Name="contacts"/>
tag for Windows 10, if that will break a build for Windows 8.1. We may need to be smarter to filter out bad values for certain versions.
Windows 10: https://msdn.microsoft.com/en-us/library/windows/apps/dn934783.aspx
Windows 8.1: https://msdn.microsoft.com/en-us/library/windows/apps/dn423259.aspx
Windows Phone 8.1?: https://msdn.microsoft.com/library/windows/apps/hh464936.aspx#domain_credentials
Windows 10 requires use of the
<uap:Capability Name="contacts"/>
tags to get access to contacts APIs.I would do like this, define new properties that specifies target platform and its version:
https://github.com/appcelerator/titanium_mobile_windows/pull/534
For QE/testing/end users, I took the approach that Kota suggested, with a small tweak to the attribute name, I used "version". So you can specify a version of "8.1" or "10.0", and can specify a target of "phone" or "store". If no target or no version is specified, it's assumed to apply to both possible values for the missing attribute. I also implemented some filtering/handling - if the capability isn't in our whitelist for the platform/version we don't use it. If the capability needs some special namespace for the tag we handle that for you. Just use the non-namespaces
<Capability />
tag.Verified as fixed, specifying targets for capabilities will affect only the specified platform. Tested on both 8.1 / 10 with
contacts
,appointments
,location
and verified under App Permissions / Privacy settings on device. Tested on: Windows 10 Pro Windows Phone 10.0 & 8.1 (Microsoft Lumia 640 LTE) Appc Studio: 4.6.0.201605030516 Ti SDK: 5.3.0.v20160517124218 Appc NPM: 4.2.5-5 Appc Core: 5.3.0-45 Node: v4.4.4 *Closing Ticket.*