setCookie(_:completionHandler:)
setCookie(_:completionHandler:)
setCookie(_:completionHandler:) Instance Method of WKHTTPCookieStore Adds a cookie to the cookie store.
func setCookie(_ cookie: HTTPCookie, completionHandler: (@MainActor @Sendable () -> Void)? = nil)Parameters
cookie
The cookie to add.
completionHandler
A completion handler block to execute asynchronously after the method successfully stores the cookie. This block has no return value and no parameters.
Discussion