Latest 0.9.0
Homepage https://github.com/haifengkao/YWebView
License MIT
Platforms ios 8.0
Authors

CI Status
Coverage Status
Version
License
Platform

The primary codes are copied from an answer of SO.
All cookies will be loaded from NSHTTPCookieStorage. When a web page is loaded, its cookies will be save to NSHTTPCookieStorage as well.
This method allows cookie sharing among multiple WKWebView and UIWebView.

If you want to remove all cookies, use

NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (NSHTTPCookie *cookie in cookieStorage.cookies) {
    [cookieStorage deleteCookie:cookie];
}

Usage

Just use YWebView as the ordinary WKWebView.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 8.0 (the minimum requirement for WKWebView)

Installation

YWebView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "YWebView"

Author

Hai Feng Kao, [email protected]

License

YWebView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "YWebView",
    "version": "0.9.0",
    "summary": "WKWebview with persistent cookie support.",
    "description": "WKWebView, unlike UIWebView, doesn't support cookie persistency and sharing. There are multiple solutions on the Internet to deal with issue. YWebView combines the existing solutions to make WKWebView behave like the Old UIWebView.",
    "homepage": "https://github.com/haifengkao/YWebView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Hai Feng Kao": "[email protected]"
    },
    "source": {
        "git": "https://github.com/haifengkao/YWebView.git",
        "tag": "0.9.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "YWebView/Classes/**/*"
}

Pin It on Pinterest

Share This