wkhttpcookiestore相关内容
用例:我有两个WKWebView,一个在主应用程序中,另一个在应用程序扩展中。我希望它们共享同一个Cookie存储区。 Apple API有两个不同的Cookie存储类:WKHTTPCookieStore和HTTPCookieStorage。 Apple还有sharedCookieStorage(forGroupContainerIdentifier identifier: Strin
..
我们最近已迁移到WKWebview.我们已经添加了一个cookie更改侦听器,以获取更新的cookie并更新我们自己的商店. - (void)cookiesDidChangeInCookieStore:(WKHTTPCookieStore *)cookieStore { [cookieStore getAllCookies:^(NSArray* cookies) { }];
..
我拼命尝试将自定义cookie添加到WKWebView实例(不使用Javascript或类似的解决方法). 在iOS 11及更高版本中,Apple提供了执行此操作的API:WKWebView s WKWebsiteDataStore具有属性httpCookieStore. 这是我的(示例)代码: import UIKit import WebKit class ViewCont
..