{ "id": "175194", "key": "TIMOB-27987", "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": "21051", "description": "", "name": "Release 9.2.0", "archived": false, "released": true, "releaseDate": "2020-09-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-09-08T15:54:36.000+0000", "created": "2020-06-25T19:11:14.000+0000", "epic": { "id": 175154, "key": "TIMOB-27964", "name": "Support iOS 14", "summary": "iOS: Support iOS 14 and Xcode 12", "color": { "key": "color_1" }, "done": false }, "priority": { "name": "High", "id": "2" }, "labels": [ "webview" ], "versions": [], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-09-08T15:54:36.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": "In WKWebView Apple has given new APIs. e.g.\r\n1. [pageZoom|https://developer.apple.com/documentation/webkit/wkwebview/3516411-pagezoom?changes=latest_minor&language=objc]\r\n2. [createPDF|https://developer.apple.com/documentation/webkit/wkwebview/3516407-createpdfwithconfiguration?changes=latest_minor&language=objc]\r\n3. [createWebArchivedData|https://developer.apple.com/documentation/webkit/wkwebview/3516408-createwebarchivedatawithcompleti?changes=latest_minor&language=objc]\r\n4. [findString|https://developer.apple.com/documentation/webkit/wkwebview/3516409-findstring?changes=latest_minor&language=objc]\r\n\r\nExpose these APIs in titanium.\r\n\r\nCorresponding Titanium APIs - \r\n1. Property\r\n\r\n{code:java}\r\nTi.UI.WebView.zoomLevel\r\n{code}\r\nIt already exists. Internal implementation, native side, will be changed.\r\n2. Function\r\n\r\n{code:java}\r\nTi.UI.WebView.createPDF(callback);\r\n{code}\r\n\r\n3. Function \r\n\r\n{code:java}\r\nTi.UI.WebView.createWebArchive(callback);\r\n{code}\r\n\r\n4. Function\r\n\r\n{code:java}\r\nTi.UI.WebView.findString(string, Options, callback);\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "iOS 14: Expose new APIs given in WKWebView", "creator": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1202, "state": "closed", "name": "2020 Sprint 15", "startDate": "2020-07-20T22:16:05.601Z", "endDate": "2020-07-31T22:16:00.000Z", "completeDate": "2020-08-03T20:27:12.585Z", "originBoardId": 114 }, { "id": 1203, "state": "closed", "name": "2020 Sprint 16", "startDate": "2020-08-03T20:57:55.114Z", "endDate": "2020-08-14T20:57:00.000Z", "completeDate": "2020-08-14T15:19:51.647Z", "originBoardId": 114 }, { "id": 1204, "state": "closed", "name": "2020 Sprint 17", "startDate": "2020-08-17T15:48:00.000Z", "endDate": "2020-08-28T15:48:00.000Z", "completeDate": "2020-08-31T15:36:28.040Z", "originBoardId": 114 }, { "id": 1205, "state": "closed", "name": "2020 Sprint 18", "startDate": "2020-08-31T15:45:10.220Z", "endDate": "2020-09-11T15:45:00.000Z", "completeDate": "2020-09-11T19:56:20.674Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "456192", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR - https://github.com/appcelerator/titanium_mobile/pull/11834\r\n\r\nTest Case -\r\nSteps -\r\n1. findString - Click on button 'Search String (Measure)'. It should show alert, whether 'Measure' string is present or not.\r\n2. createPDF - Click on button 'Create PDF of webpage'. It will create pdf data of webpage and the pdf data is opened in another webview. You should see pdf like page.\r\n3. createWebArchive - Click on button 'Create Web Archive of page'. It will create webarchive data of webpage and the webarchive data will be opened in another webview.\r\n4. zoomLevel - Click on button 'Zoom by factor 2'. It will zoom the webpage 2 times. This property is already exits in previous SDK for all iOS versions. In iOS 14 apple has introduced a dedicated API for same. So underlying implementation has changed in SDK. But behavior should be same.\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#fff'\r\n});\r\n\r\nvar nextWin = Ti.UI.createWindow({\r\n\tbackgroundColor: '#fff'\r\n});\r\n\r\nvar closeButton = Ti.UI.createButton({\r\n\ttop: 50,\r\n\ttitle: 'Close'\r\n});\r\n\r\ncloseButton.addEventListener('click', function() {\r\n\tnextWin.close();\r\n});\r\n\r\nnextWin.add(closeButton);\r\n\r\nvar nextWebView = Ti.UI.createWebView({\r\n\ttop: 100,\r\n});\r\n\r\nnextWin.add(nextWebView);\r\n\r\n\r\nvar btn1 = Ti.UI.createButton({\r\n\ttop: 50,\r\n\tleft: 20,\r\n\ttitle: 'Search String (Measure)'\r\n});\r\n\r\nbtn1.addEventListener('click', function() {\r\n\twebView.findString('Measure', function(e){ // {'caseSensitive': true, 'backward': false, 'wraps': true},\r\n\t\tif (e.success) {\r\n\t\t\talert('Searched string found!');\r\n\t\t} else {\r\n\t\t\talert('Searched string not found!');\r\n\t\t}\r\n\t});\r\n});\r\n\r\nwin.add(btn1);\r\n\r\nvar btn2 = Ti.UI.createButton({\r\n\ttop: 50,\r\n\tright: 20,\r\n title: 'Create PDF of webpage'\r\n});\r\n\r\nbtn2.addEventListener('click', function() {\r\n\twebView.createPDF( function(e) {\r\n\t\tnextWebView.data = e.data;\r\n\t\tnextWin.open();\r\n\t});\r\n});\r\n\r\nwin.add(btn2);\r\n\r\nvar btn3 = Ti.UI.createButton({\r\n\ttop: 100,\r\n\tleft: 20,\r\n title: 'Create Web Archive of page'\r\n});\r\n\r\nbtn3.addEventListener('click', function() {\r\n webView.createWebArchive(function(e){\r\n\t\tnextWebView.data = e.data;\r\n\t\tnextWin.open();\r\n });\r\n});\r\n\r\nwin.add(btn3);\r\n\r\nvar btn4 = Ti.UI.createButton({\r\n\ttop: 100,\r\n\tright: 20,\r\n title: 'Zoom by factor 2'\r\n});\r\n\r\nbtn4.addEventListener('click', function() {\r\n Ti.API.info('zoom level is ', +webView.zoomLevel);\r\n webView.zoomLevel = 2;\r\n Ti.API.info('zoom level is ', +webView.zoomLevel);\r\n});\r\n\r\nwin.add(btn4);\r\n\r\nvar webView = Ti.UI.createWebView({\r\n\turl: 'https://appcelerator.com/',\r\n\ttop: 150,\r\n});\r\n\r\nwin.add(webView);\r\nwin.open();\r\n{code}\r\n", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-07-22T01:38:29.000+0000", "updated": "2020-08-31T01:48:16.000+0000" }, { "id": "456680", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed, waiting on Jenkins build and waiting for 9_3_X port.", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-01T15:39:34.000+0000", "updated": "2020-09-01T15:39:34.000+0000" }, { "id": "456764", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*. Fix verified in SDK version {{9.2.0.v20200908050955}}, and {{9.3.0.v20200908051946}}.\r\n\r\n*Test and other information can be found at:*\r\nhttps://github.com/appcelerator/titanium_mobile/pull/11834", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-08T15:54:18.000+0000", "updated": "2020-09-08T15:54:18.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }