【发布时间】:2018-10-30 20:42:17
【问题描述】:
我使用 Alamofire 进行服务器访问,而服务器 API 使用 cookie 进行身份验证。现在我想打开一个 web 视图并将应用程序中的 auth cookie 包含在 web 视图中。
Web 视图中的 API 和 URL 使用相同的域。 我真的不在乎它是使用 WKWebView 还是 SFSafariViewController,但我更喜欢 SFSafariViewController。
这可能吗?
【问题讨论】:
-
wkwebview 从 Httpcookiestorage 更改为 httpcookiestore 后,您必须同步您的 cookie。 wkwebview 有自己的 cookie 存储
标签: swift cookies webview alamofire sfsafariviewcontroller