diff --git a/WKCookieWebView/WKCookieWebView.swift b/WKCookieWebView/WKCookieWebView.swift index 97f2185..017e22c 100644 --- a/WKCookieWebView/WKCookieWebView.swift +++ b/WKCookieWebView/WKCookieWebView.swift @@ -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