Skip to content

这个是来自其他人的成果,现在来源链接断了(其中还包含个人写的关于缓存的demo)。

License

Notifications You must be signed in to change notification settings

xinweizhou619/NSURLProtocol-WebKitSupport

Repository files navigation

NSURLProtocol+WebKitSupport

让 WKWebView 支持 NSURLProtocol

This example project shows a way to use NSURLProtocol with WKWebView, which was not possible before.

Screenshot

Usage

Drag NSURLProtocol+WebKitSupport.h and NSURLProtocol+WebKitSupport.m into your project, then register the scheme for NSURLProtocol to handle:

[NSURLProtocol wk_registerScheme:@"https"];

// You can now use your own NSURLProtocol subclasses as before.
[NSURLProtocol registerClass:[MyAwesomeURLProtocol class]];

To remove the scheme from registery:

[NSURLProtocol wk_unregisterScheme:@"https"];

Note

This category uses undocumented APIs in WebKit. Use at your own risk.

About

这个是来自其他人的成果,现在来源链接断了(其中还包含个人写的关于缓存的demo)。

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published