[AC-6221] Local Html based web view not working on sdk 8
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2019-05-11T00:20:31.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Peter Ladis |
Assignee | Shak Hossain |
Created | 2019-04-19T23:10:52.000+0000 |
Updated | 2019-05-11T00:20:31.000+0000 |
Description
When I run sdk 8. My web view loads but the display is super small. Any js events inside the html don’t work properly. Is there any way to get the 7.4.2 functionality back
The old iOS native
UIWebView
has been deprecated by Apple. As of Titanium 8.0.0, theTi.UI.WebView
has been re-implemented to use Apple'sWKWebView
which does have some breaking changes on Apple's end. For your local HTML files, you'll need to add the following<meta>
tag so that it'll scale the contents like how it worked before.Also, I've tested iOS'
WebView
with a locally loaded HTML string as shown below. The below code tests interop between the HTML JavaScript and the Titanium JavaScript viaTi.App.fireEvent()
and the new asyncWebView.evalJS()
feature. It works fine.Can you give us an example of what's not working for you please? Thanks.
My above test was missing a
Ti.App.addEventListener()
in the HTML's JavaScript. So, I also ran the below which exercises this as well. This too works fine for me in iOS with Titanium 8.0.0.Hello, I have tested the sample code by Joshus above of local HTML with SDK 8.0.0.GA in iOS. Works fine on my end. Please share sample code can reproduce the issue. We will test it on our end. Thanks.