FWWebViewCookieManager
@interface FWWebViewCookieManager : NSObject
WKWebView管理Cookie
-
同步首个请求的Cookie
Declaration
Objective-C
+ (void)syncRequestCookie:(nonnull NSMutableURLRequest *)request;
-
同步请求的httpOnly Cookie
Declaration
Objective-C
+ (void)syncRequestHttpOnlyCookie:(nonnull NSMutableURLRequest *)request;
-
同步ajax请求的Cookie
Declaration
Objective-C
+ (nonnull NSString *)ajaxCookieScripts;
-
同步重定向请求的Cookie
Declaration
Objective-C
+ (nonnull NSMutableURLRequest *)fixRequest:(nonnull NSURLRequest *)request;
-
拷贝共享Cookie到webView,iOS11+有效
Declaration
Objective-C
+ (void)copySharedCookie:(nonnull WKWebView *)toWebView completion:(nullable void (^)(void))completion;
-
拷贝webView到共享Cookie,iOS11+有效
Declaration
Objective-C
+ (void)copyWebViewCookie:(nonnull WKWebView *)fromWebView completion:(nullable void (^)(void))completion;
-
Cookie日期格式化对象
Declaration
Objective-C
+ (nonnull NSDateFormatter *)cookieDateFormatter;