【发布时间】:2015-10-11 17:11:20
【问题描述】:
感谢下面问题的回答,我弄清楚了如何通过使用 WKProcessPool 在多个 WKWebView 之间使用 Cookie。
Cookie sharing between multiple WKWebViews
然后我现在尝试使用 NSUserDefaults 永久存储 WKProcessPool 对象(我的单例对象)。
我遇到以下错误。
Attempt to insert non-property list object
所以我尝试通过 NSKeyedArchiver 将 WKProcessPool 对象转换为 NSData 来修复错误。
但是因为WKProcessPool没有实现encodeWithCoder:和init:aDecoder所以做不到。
如何解决这个问题以永久存储 WKProcessPool 对象?
【问题讨论】:
标签: ios xcode swift cookies wkwebview