Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2464] iOS: Ti.WKWebView - Crash when not running on main thread

GitHub Issuen/a
TypeBug
PriorityCritical
StatusResolved
ResolutionFixed
Resolution Date2018-09-20T10:34:23.000+0000
Affected Version/sn/a
Fix Version/sTi.WKWebView 2.8.2
Componentsn/a
Labelsn/a
ReporterIanko Leite
AssigneeHans Knöchel
Created2018-09-19T21:20:15.000+0000
Updated2018-09-20T10:35:30.000+0000

Description

Attachments

FileDateSize
demo_app.zip2018-09-19T21:41:39.000+00001847465

Comments

  1. Hans Knöchel 2018-09-20

    We actually fixed this for the Ti.UI.WebView changes (8.0.0) already, where the web-view will be using the WKWebView. [~vsingh] to double-check.
  2. Hans Knöchel 2018-09-20

    [~ianko] Found the issue and fixed it. There were actual two issues: 1. The iOS 12 WKWebView is still not thread-safe and now causes a crash when initializing from a background-thread (aka kroll-thread in this case) 2. The native handler of the evalJS method is now called on the main-thread, causing the current synchronous execution to break due to a deadlock in the run-loop used. Developers should use the asynchronous API moving forward, for best performance, no UI-lacks and future-proof apps. New release including detailed release-notes: https://github.com/appcelerator-modules/Ti.WKWebView/releases/tag/v2.8.2 Cheers!

JSON Source