[Webkit-unassigned] [Bug 138169] WKWebView does not fully support custom NSURLProtocol

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 1 14:21:00 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=138169

Garvan Keeley <garvankeeley at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |garvankeeley at gmail.com

--- Comment #25 from Garvan Keeley <garvankeeley at gmail.com> ---
NSURLProtocol interception of WKWebView http/https is theoretically possible:

Class cls = [[[WKWebView new] valueForKey:@"browsingContextController"] class];
SEL sel = NSSelectorFromString(@"registerSchemeForCustomProtocol:");
[(id)cls performSelector:sel withObject:@"http"];
[(id)cls performSelector:sel withObject:@"https"];

Followed by an NSURLProtocol registration will intercept all calls.

Credit to this github user who also has a demo project https://github.com/WildDylan/WKWebViewWithURLProtocol

Given that this already works, perhaps Apple can consider exposing it officially.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161201/bbf0c879/attachment.html>


More information about the webkit-unassigned mailing list