Skip to content

Commit

Permalink
Save all retrieved cookies and get cookies using javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Diente committed May 21, 2020
1 parent 70e83e5 commit 5addbc6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions WKCookieWebView/WKCookieWebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ open class WKCookieWebView: WKWebView {
return super.load(request)
}

@objc public func deleteRecordedCookie(_ cookie: HTTPCookie) {
recordedCookies.removeAll(where: { $0.name == cookie.name })
}

// MARK: - Private
private func userContentWithCookies(_ url: URL) -> WKUserContentController {
let userContentController = configuration.userContentController
Expand Down

0 comments on commit 5addbc6

Please sign in to comment.