Swiftpack.co - Kofktu/WKCookieWebView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Kofktu.
Kofktu/WKCookieWebView 2.0.3
WKWebView with cookie sharing support
⭐️ 193
🕓 33 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/Kofktu/WKCookieWebView.git", from: "2.0.3")

WKCookieWebView

  • WKWebView with cookie sharing support

Requirements

  • iOS 8.0+
  • XCode 9.0+
  • Swift 5
  • Swift 4 (1.1.3)
  • Swift 3 (0.0.3)

Installation

CocoaPods

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

pod 'WKCookieWebView', '~> 2.0'

Carthage

For iOS 8+ projects with Carthage

github "Kofktu/WKCookieWebView"

Usage

When HTTPCookieStorage is updated

public var onUpdateCookieStorage: ((WKCookieWebView) -> Void)?

If you need to set WKWebViewConfiguration

let webView = WKCookieWebView(frame: frame, configurationBlock: { (configuration) in
    // customize configuration
})

Preloader

After running the app, before the first webview was loaded,
Cookies may not be set properly,
In that case, use the loader in advance to synchronize.

WKCookieWebView.preloadWithDomainForCookieSync(urlString: String, completion: (() -> Void)?)

Authors

Taeun Kim (kofktu), [email protected]

License

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

GitHub

link
Stars: 193
Last commit: 33 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

2.0.2 Release
3 years ago

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