Swiftpack.co - haifengkao/YWebView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by haifengkao.
haifengkao/YWebView 0.20.0
WKWebview with persistent cookies support
⭐️ 104
🕓 2 years ago
iOS macOS
.package(url: "https://github.com/haifengkao/YWebView.git", from: "0.20.0")

YWebView

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.

GitHub

link
Stars: 104
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Related Packages

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics