cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ephemer <>
Subject [GitHub] cordova-plugin-wkwebview-engine pull request: Fixes CB-11074: WKWe...
Date Thu, 28 Apr 2016 14:58:05 GMT
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.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

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

View raw message