Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kofktu/wkcookiewebview
WKWebView with cookie sharing support
https://github.com/kofktu/wkcookiewebview
carthage cocoapods cookie httpcookiestorage ios swift wkwebview
Last synced: 3 days ago
JSON representation
WKWebView with cookie sharing support
- Host: GitHub
- URL: https://github.com/kofktu/wkcookiewebview
- Owner: Kofktu
- License: mit
- Created: 2017-06-24T05:13:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-04T00:30:06.000Z (over 1 year ago)
- Last Synced: 2024-12-13T04:37:02.738Z (10 days ago)
- Topics: carthage, cocoapods, cookie, httpcookiestorage, ios, swift, wkwebview
- Language: Swift
- Size: 88.9 KB
- Stars: 197
- Watchers: 7
- Forks: 29
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WKCookieWebView
- WKWebView with cookie sharing support
## Requirements
- iOS 8.0+
- XCode 9.0+
- Swift 5
- Swift 4 ([1.1.3](https://github.com/Kofktu/WKCookieWebView/tree/1.1.3))
- Swift 3 ([0.0.3](https://github.com/Kofktu/WKCookieWebView/tree/0.0.3))## Installation
#### CocoaPods
WKCookieWebView is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'WKCookieWebView', '~> 2.0'
```#### Carthage
For iOS 8+ projects with [Carthage](https://github.com/Carthage/Carthage)```
github "Kofktu/WKCookieWebView"
```## Usage
#### When HTTPCookieStorage is updated
```swift
public var onUpdateCookieStorage: ((WKCookieWebView) -> Void)?
```#### If you need to set WKWebViewConfiguration
```swift
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.```swift
WKCookieWebView.preloadWithDomainForCookieSync(urlString: String, completion: (() -> Void)?)
```## Authors
Taeun Kim (kofktu),
## License
WKCookieWebView is available under the ```MIT``` license. See the ```LICENSE``` file for more info.