[TIMOB-27987] iOS 14: Expose new APIs given in WKWebView
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-09-08T15:54:36.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.2.0 |
Components | iOS |
Labels | webview |
Reporter | Vijay Singh |
Assignee | Vijay Singh |
Created | 2020-06-25T19:11:14.000+0000 |
Updated | 2020-09-08T15:54:36.000+0000 |
Description
In WKWebView Apple has given new APIs. e.g.
1. [pageZoom](https://developer.apple.com/documentation/webkit/wkwebview/3516411-pagezoom?changes=latest_minor&language=objc)
2. [createPDF](https://developer.apple.com/documentation/webkit/wkwebview/3516407-createpdfwithconfiguration?changes=latest_minor&language=objc)
3. [createWebArchivedData](https://developer.apple.com/documentation/webkit/wkwebview/3516408-createwebarchivedatawithcompleti?changes=latest_minor&language=objc)
4. [findString](https://developer.apple.com/documentation/webkit/wkwebview/3516409-findstring?changes=latest_minor&language=objc)
Expose these APIs in titanium.
Corresponding Titanium APIs -
1. Property
Ti.UI.WebView.zoomLevel
It already exists. Internal implementation, native side, will be changed.
2. Function
Ti.UI.WebView.createPDF(callback);
3. Function
Ti.UI.WebView.createWebArchive(callback);
4. Function
Ti.UI.WebView.findString(string, Options, callback);
PR - https://github.com/appcelerator/titanium_mobile/pull/11834 Test Case - Steps - 1. findString - Click on button 'Search String (Measure)'. It should show alert, whether 'Measure' string is present or not. 2. 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. 3. 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. 4. 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.
FR Passed, waiting on Jenkins build and waiting for 9_3_X port.
*Closing ticket*. Fix verified in SDK version
9.2.0.v20200908050955
, and9.3.0.v20200908051946
. *Test and other information can be found at:* https://github.com/appcelerator/titanium_mobile/pull/11834