From 2d7da50a2bd59a5fa7c4711dce45d09cb847020c Mon Sep 17 00:00:00 2001 From: Jason Safaiyeh Date: Sun, 29 Dec 2019 12:37:34 -0800 Subject: [PATCH 1/2] Remove unused getAll function --- ios/RNCookieManagerIOS/RNCookieManagerIOS.m | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ios/RNCookieManagerIOS/RNCookieManagerIOS.m b/ios/RNCookieManagerIOS/RNCookieManagerIOS.m index 47609f6..b1fcee5 100644 --- a/ios/RNCookieManagerIOS/RNCookieManagerIOS.m +++ b/ios/RNCookieManagerIOS/RNCookieManagerIOS.m @@ -230,21 +230,6 @@ -(NSString *)getDomainName:(NSURL *) url } } -RCT_EXPORT_METHOD(getAll:(RCTPromiseResolveBlock)resolve - rejecter:(RCTPromiseRejectBlock)reject) { - NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; - NSMutableDictionary *cookies = [NSMutableDictionary dictionary]; - for (NSHTTPCookie *c in cookieStorage.cookies) { - NSMutableDictionary *d = [NSMutableDictionary dictionary]; - [d setObject:c.value forKey:@"value"]; - [d setObject:c.name forKey:@"name"]; - [d setObject:c.domain forKey:@"domain"]; - [d setObject:c.path forKey:@"path"]; - [d setObject:[self.formatter stringFromDate:c.expiresDate] forKey:@"expiresDate"]; - [cookies setObject:d forKey:c.name]; - } -} - -(NSDictionary *)createCookieList:(NSArray*)cookies { NSMutableDictionary *cookieList = [NSMutableDictionary dictionary]; From ab1d7ef2ef53906a9401706eee7ee343a20fbdd0 Mon Sep 17 00:00:00 2001 From: Jason Safaiyeh Date: Sun, 29 Dec 2019 12:39:09 -0800 Subject: [PATCH 2/2] Update getAll in README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2bbfb5c..cecee07 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,8 @@ CookieManager.get('http://example.com') }); // list cookies (IOS ONLY) -CookieManager.getAll() +// useWebKit: boolean +CookieManager.getAll(useWebKit) .then((res) => { console.log('CookieManager.getAll =>', res); });