我用以下代码创建了一个自定义cookie。
let url = URL(string: "cookies.url.com") let cookieStorage = HTTPCookieStorage.shared let cookieHeaderField = ["Set-Cookie": "key=value"] let cookie = HTTPCookie.cookies(withResponseHeaderFields: cookieHeaderField, for: url)
在Safari中打开另一个URL之前,如何从iOS应用将此Cookie设置为Safari?