{ "id": "159342", "key": "TIMOB-23156", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-09-07T14:54:26.000+0000", "created": "2016-04-06T06:22:05.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [ { "id": "52625", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "163005", "key": "TIMOB-23866", "fields": { "summary": "Windows: uap capability included when building for 8.1", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52633", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "163020", "key": "TIMOB-23869", "fields": { "summary": "Windows: Ti.Media.takePicture usage does not include videosLibrary capability", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-10-21T14:27:07.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "With TIMOB-18995 the user can now define Capabilities, as explained in [this guide|http://docs.appcelerator.com/platform/latest/#!/guide/tiapp.xml_and_timodule.xml_Reference-section-29004921_tiapp.xmlandtimodule.xmlReference-Windows-specificsection].\r\n\r\nJust like we do for most of Android and iOS it would be great if we would automatically add the required Capabilities based on API usage. So if you use {{Ti.Media.showCamera}} in your code, it would automatically add the _microphone_ and _webcam_ Capabilities.\r\n\r\nh5. Test Case\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ backgroundColor: 'black' }),\r\n lbl = Ti.UI.createLabel({ top: '5%', left: 5, color: 'white' }),\r\n btn_a = Ti.UI.createButton({ top: '25%',color: 'white', title: 'showCamera()' }),\r\n btn_b = Ti.UI.createButton({ top: '35%', color: 'white', title: 'openPhotoGallery()' });\r\n\r\nTi.Geolocation.getCurrentPosition(function (data) {\r\n if (data.success) {\r\n lbl.text += 'getCurrentPosition()' + data.coords.latitude + ',' + data.coords.longitude;\r\n }\r\n});\r\nbtn_a.addEventListener('click', function () {\r\n Titanium.Media.showCamera({});\r\n});\r\nbtn_b.addEventListener('click', function () {\r\n Titanium.Media.openPhotoGallery({mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO]});\r\n});\r\n\r\nwin.add(lbl);\r\nwin.add(btn_a);\r\nwin.add(btn_b);\r\nwin.open();\r\n{code}\r\n\r\nAnd then build it\r\n\r\n{code}\r\nappc ti build -p windows --wp-sdk 10.0 --target wp-device\r\n{code}\r\n\r\nh5. Expected\r\n\r\nPROJECT_ROOT/build/windows/win10.ARM/Package.appxmanifest\r\n\r\n{code}\r\n\r\n\r\n\r\n\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "Windows: Automatically add required Capabilities to Manifest based on API usage", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": null, "closedSprints": [ { "id": 678, "state": "closed", "name": "2016 Sprint 14 SDK", "startDate": "2016-07-02T00:25:57.921Z", "endDate": "2016-07-16T00:25:00.000Z", "completeDate": "2016-07-18T03:18:29.729Z", "originBoardId": 114 }, { "id": 704, "state": "closed", "name": "2016 Sprint 18 SDK", "startDate": "2016-08-27T00:18:36.960Z", "endDate": "2016-09-10T00:18:00.000Z", "completeDate": "2016-09-09T20:26:13.865Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "389902", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/761", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-04T21:31:05.000+0000", "updated": "2016-07-04T21:31:05.000+0000" }, { "id": "395331", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Reopening ticket:\r\n\r\nOS: Windows 10 Pro\r\nAppc core: 6.0.0-38\r\nAppc NPM: 4.2.8-6\r\nTi SDK: 6.0.0.v20160904203840\r\n\r\nWhen the last file parsed does not contain any api usage that needs a capability then the appxmanifest will not contain all the required capabilities\r\n\r\nh5.Steps to reproduce\r\n\r\n# Create a file called z.js in your apps resources folder and paste the following {{var win = Ti.UI.createWindow(\\{ backgroundColor: 'black' \\});}}\r\n# Paste the test case from above into your app.js\r\n# Build the project using {{appc run -p windows -T wp-device --wp-sdk 10.0 --build-only}}\r\n# Open the appxmanifest file in build\\windows\\win10.ARM\r\n# Rename the file to a.js\r\n# Build the project using {{appc run -p windows -T wp-device --wp-sdk 10.0 --build-only}}\r\n# Open the appxmanifest file in build\\windows\\win10.ARM\r\n\r\nh5.Actual result\r\n\r\nAt step 4 the capabilities section in the appxmanifest file matches the below\r\n{code}\r\n\r\n \r\n \r\n{code}\r\n\r\nAt step 7 the capabilities section in the appxmanifest file matches the below \r\n\r\n{code}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n{code}\r\n\r\nh5.Expected result\r\n\r\nIn both cases the capabilities section in the appxmanifest file should be the same as the below\r\n\r\n{code}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-05T12:05:22.000+0000", "updated": "2016-09-06T11:45:12.000+0000" }, { "id": "395386", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile_windows/pull/853\r\n6_0_X: https://github.com/appcelerator/titanium_mobile_windows/pull/854", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-06T12:38:49.000+0000", "updated": "2016-09-06T12:38:49.000+0000" }, { "id": "395478", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Merged, will resolve this as Fixed once Jenkins 6_0_X build passes it.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-07T04:33:21.000+0000", "updated": "2016-09-07T04:33:21.000+0000" }, { "id": "399577", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified using:\r\n\r\nOS: Microsoft Windows 10 Pro 10.0.14393\r\nAppc core: 6.0.0-63\r\nAppc NPM: 4.2.8-9\r\nTi SDK: 6.1.0.v20161020155633\r\nAppc Studio: 4.8.0.201610171310\r\n\r\nCapabilities are now generated based off API usage in an app. Build process will merge user defined capabilities from the tiapp.xml with generated ones allowing cases like TIMOB-23981 to be worked around easily. Example from previous comment now works.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2016-10-21T14:27:03.000+0000", "updated": "2016-10-21T14:27:03.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }