Skip to content

Commit aeac4a2

Browse files
author
Philipp Wallrich
committed
added missing Method
1 parent 4f8dd81 commit aeac4a2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ios/RCTWKWebView/RCTWKWebView.m

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,23 @@ - (void)stopLoading
299299
[_webView stopLoading];
300300
}
301301

302+
- (NSString *) cookieDescription:(NSHTTPCookie *)cookie {
303+
304+
NSMutableString *cDesc = [[NSMutableString alloc] init];
305+
[cDesc appendFormat:@"%@=%@;",
306+
[[cookie name] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
307+
[[cookie value] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
308+
if ([cookie.domain length] > 0)
309+
[cDesc appendFormat:@"domain=%@;", [cookie domain]];
310+
if ([cookie.path length] > 0)
311+
[cDesc appendFormat:@"path=%@;", [cookie path]];
312+
if (cookie.expiresDate != nil)
313+
[cDesc appendFormat:@"expiresDate=%@;", [cookie expiresDate]];
314+
315+
316+
return cDesc;
317+
}
318+
302319
- (void) copyCookies {
303320

304321
NSHTTPCookieStorage* storage = [NSHTTPCookieStorage sharedHTTPCookieStorage];

0 commit comments

Comments
 (0)