Tagged articles
1 articles
Page 1 of 1
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Jan 28, 2021 · Mobile Development

iOS WKWebView Request Interception via WKURLSchemeHandler and JavaScript Injection

By combining WKURLSchemeHandler with injected JavaScript that captures request bodies, forwards them via WKScriptMessageHandler, and synchronizes cookies and redirects, this approach overcomes iOS WKWebView’s native limitations, offering a stable, per‑webview interception method superior to NSURLProtocol for offline‑package loading.

JavaScript InjectionWKURLSchemeHandlerWKWebView
0 likes · 18 min read
iOS WKWebView Request Interception via WKURLSchemeHandler and JavaScript Injection