{ "id": "151711", "key": "TIMOB-19667", "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": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-02-12T03:27:35.000+0000", "created": "2015-10-05T06:25:47.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "applepencil", "iOS9.1", "notable", "qe-5.2.0" ], "versions": [], "issuelinks": [ { "id": "49276", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "151095", "key": "TIMOB-19492", "fields": { "summary": "iOS9: 3D-Touch: Support new UITouch properties + events", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-10-10T16:30:04.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UITouch_Class/index.html#//apple_ref/occ/cl/UITouch\r\n\r\niOS 9.1 introduces APIs that help you use coalesced and predictive touches that can be produced by Apple Pencil on supported devices. Specifically, the UITouch class includes:\r\n\r\nThe preciseLocationInView: and precisePreviousLocationInView: methods, which give you the precise location for a touch (when available)\r\nThe altitudeAngle property and the azimuthAngleInView: and azimuthUnitVectorInView: methods, which help you determine the altitude and azimuth of the stylus\r\nThe estimatedProperties and updatedProperties properties, which help you prepare to update touches that are estimated\r\nFor an example of some ways to take advantage of these APIs in your app, see the sample project [TouchCanvas: Using UITouch efficiently and effectively|https://developer.apple.com/library/prerelease/ios/samplecode/TouchCanvas/Introduction/Intro.html#//apple_ref/doc/uid/TP40016561].", "attachment": [], "flagged": false, "summary": "iOS9.1: Support for Apple Pencil", "creator": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "iOS 9.1", "closedSprints": [ { "id": 529, "state": "closed", "name": "2015 Sprint 24 SDK", "startDate": "2015-11-21T01:30:12.670Z", "endDate": "2015-12-05T01:30:00.000Z", "completeDate": "2015-12-07T03:57:17.094Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "368858", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR pending: https://github.com/appcelerator/titanium_mobile/pull/7419\r\n\r\nDemo code : \r\n{code:javascript}\r\n//this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nvar previousePos = 0;\r\nvar listenerType = \"Nothing\";\r\nvar win = Titanium.UI.createWindow({\r\n\tbackgroundColor : \"#FFFFFF\"\r\n});\r\n\r\nvar bswitchingViews = false;\r\n\r\nvar tab1 = Ti.UI.createTab({\r\n window: win,\r\n title: 'Normal View'\r\n});\r\n\r\nvar view = Titanium.UI.createView({\r\n borderRadius:10,\r\n backgroundColor:'blue',\r\n width:Ti.UI.FILL,\r\n height:Ti.UI.FILL\r\n});\r\n\r\nvar label1 = Ti.UI.createLabel({\r\n text : 'Main Screen',\r\n accessibilityLabel : 'Label on first Scrollview',\r\n color : 'white'\r\n});\r\n\r\nvar button1 = Ti.UI.createButton({\r\n\ttitle : 'Listener : '+ listenerType,\r\n\tcolor : 'White',\r\n\ttop \t: -40,\r\n\tleft\t: 5,\r\n \twidth \t: 150,\r\n \theight\t: 150\r\n\r\n\r\n});\r\n\r\n\r\n\r\n\r\nvar forceButton = Ti.UI.createButton({\r\n\ttitle : 'Enable/Dissable',\r\n\tcolor : 'White',\r\n\ttop \t: -40,\r\n\tright\t: 10,\r\n \twidth \t: 180,\r\n \theight\t: 150\r\n\r\n\r\n});\r\n\r\nforceButton.addEventListener(\"singletap\",function (e) { \r\n\tbswitchingViews = !bswitchingViews; \r\n\tlabel2.text = 'Enables/Dissables switching between views with force touch. Current status =' + bswitchingViews;\r\n});\r\n\r\nvar label2 = Ti.UI.createLabel({\r\n text : 'Enables/Disables switching between views with force touch. Current status =' + bswitchingViews,\r\n accessibilityLabel : 'Label on first Scrollview',\r\n color \t: 'white',\r\n top \t: 10,\r\n\tright\t: 5,\r\n\tfont: { fontSize:12 },\r\n \twidth \t: 150,\r\n \theight\t: 150\r\n});\r\n\r\n\r\n\r\nbutton1.addEventListener(\"touchend\", function(e) {\r\n \t//printNewProperties(e,\"Button:touchEnd\");\r\n \tswitch (listenerType) {\r\n\r\n \tcase \"touchmove\":\r\n \tlistenerType = \"touchstart\";\r\n \tbutton1.title = 'Listener : '+ listenerType;\r\n \tbreak;\r\n \tcase \"touchstart\":\r\n \tlistenerType = \"touchend\";\r\n \tbutton1.title = 'Listener : '+ listenerType;\r\n \tbreak;\r\n \tcase \"touchend\":\r\n \t\tlistenerType = \"touchmove\";\r\n \t\tbutton1.title = 'Listener : '+ listenerType;\r\n \tbreak;\r\n \tdefault:\r\n listenerType = \"touchmove\";\r\n button1.title = 'Listener : '+ listenerType;\r\n\t}\r\n});\r\n\r\nview.addEventListener(\"touchmove\", function(e) {\r\n\tif (listenerType == \"touchmove\") { \r\n\tprintNewProperties(e,\"View: \" + listenerType);\r\n\t}\r\n});\r\n\r\nview.addEventListener(\"touchstart\", function(e) {\r\n\tif (listenerType == \"touchstart\") {\r\n\tprintNewProperties(e,\"View: \"+listenerType);\r\n\t}\r\n});\r\n\r\nview.addEventListener(\"touchend\", function(e) {\r\n\tif (listenerType == \"touchend\") {\r\n\tprintNewProperties(e,\"View: \"+listenerType);\r\n\t}\r\n});\r\n\r\nfunction printNewProperties(e, touchType) {\r\n\tTi.API.info(touchType+\":force \"+e.force);\r\n\tvar forceString = touchType+\":force \"+e.force;\r\n\tTi.API.info(touchType+\":maximumPossibleForce \"+e.maximumPossibleForce);\r\n\tTi.API.info(touchType+\":altitudeAngle \"+ e.altitudeAngle);\r\n\tTi.API.info(touchType+\":time stamp \"+ e.timestamp);\r\n\tprintToScreen(e);\r\n}\r\n\r\n/*Second Wndow and Second Tab*/\r\nvar win2 = Titanium.UI.createWindow({\r\n\tbackgroundColor : \"#FFFFFF\"\r\n});\r\n\r\nvar tab2 = Ti.UI.createTab({\r\n window: win2,\r\n title: 'Table View'\r\n});\r\n\r\nvar justStuff = Ti.UI.createTableViewSection({ headerTitle: 'Items' });\r\n\tjustStuff.add(Ti.UI.createTableViewRow({ title: 'Arrow' }));\r\n\tjustStuff.add(Ti.UI.createTableViewRow({ title: 'Bow'}));\r\n\r\nvar justStuff2 = Ti.UI.createTableViewSection({ headerTitle: 'More Items' });\r\n\tjustStuff2.add(Ti.UI.createTableViewRow({ title: 'Bottle' }));\r\n\tjustStuff2.add(Ti.UI.createTableViewRow({ title: 'Apple' }));\r\n\r\nvar table = Ti.UI.createTableView({\r\n data: [justStuff,justStuff2]\r\n});\r\n\r\ntable.addEventListener(\"touchmove\", function(e) {\r\n\tif (listenerType == \"touchmove\") { \r\n\tprintNewProperties(e,\"Table: \" + listenerType);\r\n\t}\r\n});\r\n\r\ntable.addEventListener(\"touchstart\", function(e) {\r\n\tif (listenerType == \"touchstart\") {\r\n\tprintNewProperties(e,\"Table: \"+listenerType);\r\n\t}\r\n});\r\n\r\ntable.addEventListener(\"touchend\", function(e) {\r\n\tif (listenerType == \"touchend\") {\r\n\tprintNewProperties(e,\"Table: \"+listenerType);\r\n\t}\r\n});\r\n\r\nwin2.add(table);\r\n\r\nvar tabGroup = Ti.UI.createTabGroup({\r\n tabs: [tab1, tab2]\r\n});\r\n\r\n\r\n\r\n/*Window 3 and 4 for the longPress and Force Press*/\r\nvar win3 = Titanium.UI.createWindow({\r\n\tbackgroundColor : \"Green\"\r\n});\r\n\r\nvar win3View = Titanium.UI.createView({\r\n borderRadius:10,\r\n backgroundColor:'Green',\r\n width:Ti.UI.FILL,\r\n height:Ti.UI.FILL\r\n});\r\n\r\nvar labelWin3 = Titanium.UI.createLabel({\r\n\ttext : 'Label for the longPress window',\r\n});\r\n\r\nvar win4 = Titanium.UI.createWindow({\r\n\tbackgroundColor : \"Red\"\r\n});\r\n\r\nvar win4View = Titanium.UI.createView({\r\n borderRadius:10,\r\n backgroundColor:'Red',\r\n width:Ti.UI.FILL,\r\n height:Ti.UI.FILL\r\n});\r\n\r\nvar labelWin4 = Titanium.UI.createLabel({\r\n\ttext : 'Label for Force Touch',\r\n\tcolor : 'White'\r\n});\r\n\r\nwin3View.add(labelWin3);\r\nwin3.add(win3View);\r\n\r\nview.addEventListener(\"longpress\", function(e){\r\n\tif (bswitchingViews == true) { \r\n\t\twin3.open();\r\n\t}\r\n\t\r\n});\r\n\r\nwin4View.add(labelWin4);\r\nwin4.add(win4View);\r\n\r\nview.addEventListener(\"touchmove\", function(e){\r\n\tif (e.force > 2 && bswitchingViews == true) { \r\n\twin4.open();\r\n\t}\r\n});\r\n\r\n//Return to Main Window\r\nwin3View.addEventListener(\"singletap\" , function(e){\r\n\twin3.close();\r\n});\r\n\r\nwin4View.addEventListener(\"singletap\" , function(e){\r\n\twin4.close();\r\n});\r\n\r\n/*Console within App*/\r\n\r\nvar textArea = Ti.UI.createTextArea({\r\n borderWidth\t\t: 2,\r\n borderColor\t\t: '#bbb',\r\n borderRadius \t\t: 5,\r\n color \t\t\t: 'Red',\r\n font \t\t: {fontSize:10},\r\n editable \t\t: false,\r\n textAlign\t\t\t: 'left',\r\n bottom \t\t\t: 0,\r\n height \t\t\t: 100,\r\n width \t\t\t: Ti.UI.FILL,\r\n opacity\t\t\t: 0.5\r\n});\r\n\r\nfunction printToScreen(values) { \r\n\tif (values.y > previousePos.y + 10 || values.y < previousePos.y -10\r\n\t\t||values.x > previousePos.x + 10 || values.x < previousePos.x -10) {\r\n\r\n\t\ttextArea.value = textArea.value + \"force: \" + values.force +\"\\n\";\r\n\t\tpreviousePos = values;\r\n\t}\r\n if (previousePos == 0) { \r\n \tpreviousePos = values;\r\n }\r\n\t\r\n}\r\nview.add(button1);\r\nview.add(label1);\r\nview.add(label2);\r\nview.add(forceButton);\r\nview.add(textArea);\r\nwin.add(view);\r\ntabGroup.open();\r\n{code}", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-03T20:10:07.000+0000", "updated": "2015-11-11T21:03:54.000+0000" }, { "id": "369809", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR approved!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-11-11T21:39:29.000+0000", "updated": "2015-11-11T21:39:29.000+0000" }, { "id": "376653", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "When using the demo code on the iPad Pro, all touches including the pencil have an undefined force.\r\n\r\nTested on:\r\n
iPad Pro (9.1)\r\n
Mac OSX El Capitan 10.11.2
\r\nStudio: 4.5.0.201602111338
\r\nTi SDK: 5.2.0.v20160210114026\r\nAppc NPM: 4.2.3-2
\r\nApp CLI: 5.2.0-255\r\n
Xcode 7.2
\r\nNode v4.2.4\r\n\r\nReopening issue. \r\n", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-02-11T19:03:14.000+0000", "updated": "2016-02-11T19:03:14.000+0000" }, { "id": "376684", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR(Master): https://github.com/appcelerator/titanium_mobile/pull/7712\r\nPR(5_2_X): https://github.com/appcelerator/titanium_mobile/pull/7711", "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-02-12T00:21:11.000+0000", "updated": "2016-02-12T00:21:11.000+0000" }, { "id": "376705", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PRs merged!", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-02-12T03:27:26.000+0000", "updated": "2016-02-12T03:27:26.000+0000" }, { "id": "376974", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "The PR seems to only implement part of the [attributes|https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UITouch_Class/index.html#//apple_ref/doc/uid/TP40006785-CH3-SW13]\r\n\r\nThe [source|https://github.com/AngelkPetkov/titanium_mobile/blob/3d2c5daa39ef146e808cb48e68d1aabc804f0327/iphone/Classes/TiUtils.m#L1148-L1170] has force, maximumPossibleForce, timestamp and altitudeAngel, but not \r\nazimuthAngleInView, azimuthUnitVectorInView, preciseLocationInView and precisePreviousLocationInView\r\n\r\nI'm asking because [~bimmel] did mention these missing ones in the release notes:\r\nhttps://wiki.appcelerator.org/display/~bimmel/Titanium+SDK+5.2.0+Beta+Release+Note#TitaniumSDK5.2.0BetaReleaseNote-NewiOS9.1Features\r\n\r\n[~apetkov] given short time, maybe create a ticket for the missing ones?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-02-16T14:32:08.000+0000", "updated": "2016-02-16T14:43:25.000+0000" }, { "id": "376988", "author": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "apetkov", "key": "apetkov", "displayName": "Angel Petkov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-02-16T17:54:25.000+0000", "updated": "2016-02-16T18:11:46.000+0000" }, { "id": "376990", "author": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "body": "That line has been updated to the following: \"Full coverage for Apple Pencil APIs including force, maximumPossibleForce, timestamp and altitudeAngle.\" and a note (to myself) added that these features will be documented in 5.2.1 per a conversation with Angel this morning.", "updateAuthor": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-02-16T18:06:25.000+0000", "updated": "2016-02-16T18:45:51.000+0000" }, { "id": "377308", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed. Verified that the following events/properties can be triggered on the iPad Pro with the pencil:\r\n* touchmove\r\n* touchstart\r\n* touchend\r\n* force\r\n* maximumPossibleForce\r\n* altitudeAngle\r\n\r\nTested on:\r\n\r\nAppcelerator Studio, build: 4.5.0.201602170821\r\nAppc CLI NPM: 4.2.3-2\r\nAppc CLI Core: 5.2.0-269\r\nArrow: 1.7.27\r\nSDK: 5.2.0.v20160218123934\r\nNode: v4.2.4\r\nOS: El Capitan (10.11.3)\r\nXcode: 7.2\r\nDevice: ipad pro (9.2.1) with pencil", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-02-19T01:33:14.000+0000", "updated": "2016-02-19T01:33:14.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }