【问题标题】:How to fetch/store cookies from WKWebView in ios10?如何在 ios 10 中从 WKWebView 获取/存储 cookie?
【发布时间】:2021-03-30 22:16:15
【问题描述】:

我无法从 ios 10 中的 WKWebView 获取/存储 cookie。您能帮我解决这个问题吗?

【问题讨论】:

  • 没有不可能,先生。
  • @ElTomato 有任何文件证明吗?

标签: ios objective-c swift wkwebview ios10


【解决方案1】:

您可以尝试答案中给出的这些建议。它对我有用,我希望它对你有帮助:)

Getting all cookies from WKWebView

您也可以尝试瘦身 [更新]

WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in records.forEach { record in print(record) }

【讨论】:

  • 你能告诉我上面链接中使用了哪种解决方案
  • 十一月雨前回答
  • 不过,我的 cookie 数组是空的
  • 问题只出现在 ios 10 或其他版本中
  • 我在ios 13设备上测试过
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-11-21
  • 2016-01-14
相关资源
最近更新 更多