You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ashley Gullen (JIRA)" <ji...@apache.org> on 2016/09/29 10:33:20 UTC

[jira] [Comment Edited] (CB-11889) Add easy way to detect WKWebView

    [ https://issues.apache.org/jira/browse/CB-11889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15532416#comment-15532416 ] 

Ashley Gullen edited comment on CB-11889 at 9/29/16 10:32 AM:
--------------------------------------------------------------

Oh, right. But given how different WKWebView is regarding its same-origin policy - i.e. you can't AJAX local files, can't load images as same-origin, etc. - it seems reasonable to expect a lot of apps to have to make code changes when running on WKWebView. Accordingly it seems reasonable for Cordova to have a built-in way to indicate WKWebView. Shouldn't this be a core feature?

I have tried to persuade Apple to add a feature to identify WKWebView for the same reasons, but they rejected the request.


was (Author: ashleyscirra):
Oh, right. But given how different WKWebView is regarding its same-origin policy - i.e. you can't AJAX local files - it seems reasonable to expect a lot of apps to have to make code changes when running on WKWebView. Accordingly it seems reasonable for Cordova to have a built-in way to indicate WKWebView. Shouldn't this be a core feature?

I have tried to persuade Apple to add a feature to identify WKWebView for the same reasons, but they rejected the request.

> Add easy way to detect WKWebView
> --------------------------------
>
>                 Key: CB-11889
>                 URL: https://issues.apache.org/jira/browse/CB-11889
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>            Reporter: Ashley Gullen
>
> 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" somewhere!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org