Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23833] Windows: Generate capabilities even when they are defined in tiapp.xml

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2016-09-01T01:32:33.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.1.0
ComponentsWindows
Labelsqe-6.0.0
ReporterEwan Harris
AssigneeGary Mathews
Created2016-08-26T18:52:31.000+0000
Updated2017-01-31T19:23:05.000+0000

Description

Description

In TIMOB-23156 the auto-generation of capabilities based on API usage. Currently, if a user uses an API that needs a capability but is not included in the API capability list in the SDK then they will have to add the capability to the tiapp.xml and then figure out all other capabilities they need, an example of this is TIMOB-23832. To make the development workflow easier we should always generate the capability list even when the tiapp.xml already contains.

Comments

  1. Gary Mathews 2016-08-29

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/842
  2. Kota Iguchi 2016-09-01

    *TEST CASE* app.js
       Ti.App.setProximityDetection(true);
       
    tiapp.xml
       <windows>
           <manifest>
               <Capabilities>
                   <Capability Name="internetClient" />
                   <Capability Name="picturesLibrary" />
               </Capabilities>
           </manifest>
       </windows>
       
       appc run -p windows -S 10.0 --build-only
       
    RESULT
       <Capabilities>
           <Capability Name="internetClient" />
           <uap:Capability Name="picturesLibrary" />
           <DeviceCapability Name="proximity" />
       </Capabilities>
       
  3. Samir Mohammed 2017-01-31

    Verified improvement, was able to generate capabilities even if they were not defined in the tiapp.xml. The steps I took to verify this include: 1. Create a new app and add the following code to the app.js
       Ti.App.setProximityDetection(true);
       
    2. Then added the following capabilities to the tiapp.xml
       <windows>
           <manifest>
               <Capabilities>
                   <Capability Name="internetClient" />
                   <Capability Name="picturesLibrary" />
               </Capabilities>
           </manifest>
       </windows>
       
    3. I then ran the following command from the project directory.
       appc run -p windows -S 10.0 --build-only
       
    4. I then went to the following file C:\Users\Tester\.titanium\vsbuild\genTestv1\win10.x86\package and checked the capabilities.
       <Capabilities>
           <Capability Name="internetClient" />
           <uap:Capability Name="picturesLibrary" />
           <DeviceCapability Name="proximity" />
         </Capabilities>
       
    *Environment*
       Operating System:
       Name                        = Microsoft Windows 10 Pro
       Version                     = 10.0.14393
       Architecture                = 64bit
       

    CPUs = 4

    Memory = 17034395648 Node.js: Node.js Version = 4.6.0 npm Version = 2.11.3 Titanium SDK: SDK Version = 6.1.0.v20170131075226

JSON Source