Cookie(2)
-
WKHTTPCookieStore
# 조회 WKHTTPCookieStore *cookieStore = WKWebsiteDataStore.defaultDataStore.httpCookieStore; [cookieStore getAllCookies:^(NSArray * _Nonnull cookies) { for (NSHTTPCookie *cookie in cookies){ NSLog(@"%@", [cookie description]); } }]; WKHTTPCookieStore *cookieStore = self.webView.configuration.websiteDataStore.httpCookieStore; [cookieStore getAllCookies:^(NSArray * _Nonnull cookies) { for (NSHTTPCoo..
2020.11.24 -
NSHTTPCookieStorage
# 전체 조회 for(NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) { NSLog(@"%@", [cookie description]); } # URL지정 조회 NSURL *url = [NSURL URLWithString:@"https://wonyount2.tistory.com"]; for (NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:url]) { NSLog(@"%@", [cookie description]); } # 등록 NSHTTPCookieStorage *cookieStorage = [NSHTTP..
2020.11.24