Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24063] Windows: Allow a developer to specify required capabilities in their timodule file

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-12-20T04:58:14.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.1.0
ComponentsWindows
Labelsqe-6.0.0
ReporterEwan Harris
AssigneeKota Iguchi
Created2016-10-21T14:29:39.000+0000
Updated2017-01-27T19:22:58.000+0000

Description

Description

If a Windows Platform module requires specific capabilities to function then a module developer should be able to use the timodule.xml file (in a similar way to Android modules and permissions) to specify capabilities that are required. Then at build time these should be included with any capabilities a users app may need

Comments

  1. Kota Iguchi 2016-12-08

    https://github.com/appcelerator/titanium_mobile_windows/pull/901
  2. Samir Mohammed 2017-01-27

    Verified improvement. I was able to create a module for windows and then add capabilities in to the timodule.xml; the capabilities i added can be found in https://github.com/appcelerator/titanium_mobile_windows/pull/901. *Steps taken to verify* 1. Go to file -> new -> Mobile Module Project in Appc studio 2. Entered the details for the module ( Project name, Module Id ) 3. Selected the windows option 4. Pressed Next and then finish 5. Open the timodule.xml 6. Added the following code to the windows section in the timodule.xml: (https://github.com/appcelerator/titanium_mobile_windows/pull/901)
       <manifest>
                   <Capabilities>
                     <DeviceCapability Name="location" />
                   </Capabilities>
       	  </manifest>
       
    7. Packaged the application 8. Selected Titanium SDK as the output location and pressed finish 9. Opened up a windows application and added the module (Go to the application tiapp.xml and then clicked on the green plus button to add the created module 10. ran the application on a emulator and windows phone 11. Once the application opened I checked if my application had the capabilities by going in to C:\Users\USERNAME\.titanium\vsbuild\YOUR_APP_NAME\Package.xxx.appxmanifest.in and i saw the following:
       <Capabilities>
           <Capability Name="internetClient" />
           <DeviceCapability Name="location"/>
         </Capabilities>
       
    *Environment*
       Appc Studio version: 4.8.1.201701192045 
       Device: Lumia 640 LTE (RM-1073) (OS Build 10.0.14393.693)
       Mobile emulator: 10.0.14393.0 1080p 6inch 2gb
       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.v20170126175503

JSON Source