jasonbekolay opened a new issue #977: URL: https://github.com/apache/cordova-ios/issues/977
# Feature Request - API to access WKWebViewConfiguration ## Motivation Behind Feature <!-- Why should this feature be implemented? What problem does it solve? --> Our team is upgrading from Cordova 5 to 6 and migrating from `UIWebView` to `WKWebView`. Our app used to use `NSURLProtocol` subclasses to handle certain requests from the UIWebView. This does not work with `WKWebView`. The new approach is to use `WKURLSchemeHandler` instances to handle requests made with a custom scheme. In order to do this, we need to register our scheme handlers with the `WKWebViewConfiguration` for the WebView. Right now, there does not seem to be a way to do this with public API. We also need to set the `websiteDataStore` on the `WKWebViewConfiguration` in order to set cookies for the WebView. ## Feature Description <!-- Describe your feature request in detail Please provide any code examples or screenshots of what this feature would look like Are there any drawbacks? Will this break anything for existing users? --> One option: Make `CDVWebViewEngine` a public class that class that can be extended. That way we can override `createConfigurationFromSettings:` and access `WKWebViewConfiguration` Also open to any other option that provides access to `WKWebViewConfiguration` ## Alternatives or Workarounds <!-- Describe alternatives or workarounds you are currently using Are there ways to do this with existing functionality? --> Our current workaround is to use a `post_install` action in CocoaPods moves `CDVWebViewEngine.h` and `CDVWebViewUIDelegate.h` from private to public, then extending `CDVWebViewEngine` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
