cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jcesarmobile (JIRA)" <>
Subject [jira] [Closed] (CB-11889) Add easy way to detect WKWebView
Date Fri, 30 Sep 2016 08:00:37 GMT


jcesarmobile closed CB-11889.
    Resolution: Not A Problem
      Assignee: jcesarmobile

I've found this code that works on iOS 10

if (window.webkit) {

In fact, this code is used by the cordova-plugin-wkwebview-engine itself (with some other
checks) to use a different bridge when the WKWebView is being used

> Add easy way to detect WKWebView
> --------------------------------
>                 Key: CB-11889
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>            Reporter: Ashley Gullen
>            Assignee: jcesarmobile
> There is no clear and easy way to detect WKWebView from the user agent string or from
any Cordova properties, AFAIK.
> Previous solutions said to test for window.indexedDB. This is no longer present on iOS
10's WKWebView. Our engine Construct 2 used to rely on this to work around the different security
model/featureset of WKWebView, but since iOS 10 changed it, all our games using WKWebView
are broken.
> I want to add some other way to detect it, but it is all undocumented and I could end
up relying on something that changes and breaks everything again.
> To prevent this problem happening again there should be something like "isWKWebView"

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message