cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-11074) WKWebView configuration is not considered
Date Thu, 28 Apr 2016 14:58:13 GMT


ASF GitHub Bot commented on CB-11074:

Github user ephemer commented on the pull request:
    As I commented in the base repo, this PR doesn't do what it says it does yet.
    @shazron is it normal to change the settings after the WebView has already been inited?
When? It seems like this feature (of changing settings after init) is creating unnecessary
work for us.
    My preferred approach would be to init the CDVPlugin/WebViewEngine instance, but not the
WKWebView immediately, because for that to work, we need the commandDelegate to be set. The
problem with that approach is that this check in `CDVViewController.m` will fail, causing
`self.webViewEngine` to fallback to UIWebView:
        if (!self.webViewEngine || ![self.webViewEngine conformsToProtocol:@protocol(CDVWebViewEngineProtocol)]
|| ![self.webViewEngine canLoadRequest:[NSURLRequest requestWithURL:self.appUrl]]) {
            self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds];
    The only thing I can image that would work in the current `CDVViewController.m` structure
is that we init a WKWebView with default options on `init`, then re-init the WKWebView in
`pluginInitialize` with the user's actual settings, because it's only then that `commandDelegate.settings`
is finally available.

> WKWebView configuration is not considered
> -----------------------------------------
>                 Key: CB-11074
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin WKWebViewEngine
>         Environment: ios
>            Reporter: Alexis Kofman
>            Priority: Critical
>              Labels: ios, triaged
> Regarding the code of WKWebView.h, WKWebViewConfiguration seems to be a readonly property.
> {code}
> @property (nonatomic, readonly, copy) WKWebViewConfiguration *configuration;
> {code}
> But in this plugin, we are trying to update the WKWebView configuration after initialising
it and it looks like all this part is not considered :

This message was sent by Atlassian JIRA

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

View raw message