我尝试将网页添加到我的应用程序(有效),但是当我尝试添加 cookie 时,它给了我这个错误:“无法使用类型为‘(URLRequest,带有:HTTPCookie?)’的参数列表调用‘加载’”
let cookie1 = HTTPCookie(properties: [
HTTPCookiePropertyKey.domain: "example.de",
HTTPCookiePropertyKey.path: "/example/",
HTTPCookiePropertyKey.secure: true,
HTTPCookiePropertyKey.name: "PHPSESSID",
HTTPCookiePropertyKey.value: "example"]) //this are the cookies I set
let example = URL(string:"example.de")
let example2 = URLRequest(url: example!)
webView.load(example2, with: cookie1) //here I tried to inject the cookie to the webviewload,
我做错了什么,有人知道我必须改变什么吗?