From 06a10b9b757af1dc0722c9f0ae9a4ec26bc39ec7 Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Wed, 27 Nov 2019 15:36:27 +0100 Subject: [PATCH] Remove react-native-cookies patch (#3615) --- patches/react-native-cookies+3.3.0.patch | 56 ------------------------ 1 file changed, 56 deletions(-) delete mode 100644 patches/react-native-cookies+3.3.0.patch diff --git a/patches/react-native-cookies+3.3.0.patch b/patches/react-native-cookies+3.3.0.patch deleted file mode 100644 index 9bc1543e5..000000000 --- a/patches/react-native-cookies+3.3.0.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff --git a/node_modules/react-native-cookies/ios/RNCookieManagerIOS/RNCookieManagerIOS.m b/node_modules/react-native-cookies/ios/RNCookieManagerIOS/RNCookieManagerIOS.m -index 47609f6..7feff14 100644 ---- a/node_modules/react-native-cookies/ios/RNCookieManagerIOS/RNCookieManagerIOS.m -+++ b/node_modules/react-native-cookies/ios/RNCookieManagerIOS/RNCookieManagerIOS.m -@@ -134,7 +134,8 @@ -(NSString *)getDomainName:(NSURL *) url - [cookieStore getAllCookies:^(NSArray *allCookies) { - NSMutableDictionary *cookies = [NSMutableDictionary dictionary]; - for(NSHTTPCookie *currentCookie in allCookies) { -- if([currentCookie.domain containsString:topLevelDomain]) { -+ NSString *domainWithDot = [NSString stringWithFormat:@".%@", currentCookie.domain]; -+ if([currentCookie.domain containsString:topLevelDomain] || [domainWithDot containsString:topLevelDomain]) { - [cookies setObject:currentCookie.value forKey:currentCookie.name]; - } - } -@@ -152,7 +153,10 @@ -(NSString *)getDomainName:(NSURL *) url - [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"]; -+ NSString *expires = [self.formatter stringFromDate:c.expiresDate]; -+ if (expires != nil) { -+ [d setObject:expires forKey:@"expiresDate"]; -+ } - [cookies setObject:d forKey:c.name]; - } - resolve(cookies); -@@ -170,16 +174,7 @@ -(NSString *)getDomainName:(NSURL *) url - WKHTTPCookieStore *cookieStore = [[WKWebsiteDataStore defaultDataStore] httpCookieStore]; - [cookieStore getAllCookies:^(NSArray *allCookies) { - for(NSHTTPCookie *currentCookie in allCookies) { -- // Uses the NSHTTPCookie directly has no effect, nor deleted the cookie nor thrown an error. -- // Create a new cookie with the given values and delete this one do the work. -- NSMutableDictionary *cookieData = [NSMutableDictionary dictionary]; -- [cookieData setValue:currentCookie.name forKey:NSHTTPCookieName]; -- [cookieData setValue:currentCookie.value forKey:NSHTTPCookieValue]; -- [cookieData setValue:currentCookie.domain forKey:NSHTTPCookieDomain]; -- [cookieData setValue:currentCookie.path forKey:NSHTTPCookiePath]; -- -- NSHTTPCookie *newCookie = [NSHTTPCookie cookieWithProperties:cookieData]; -- [cookieStore deleteCookie:newCookie completionHandler:^{}]; -+ [cookieStore deleteCookie:currentCookie completionHandler:^{}]; - } - resolve(nil); - }]; -@@ -240,7 +235,10 @@ -(NSString *)getDomainName:(NSURL *) url - [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"]; -+ NSString *expires = [self.formatter stringFromDate:c.expiresDate]; -+ if (expires != nil) { -+ [d setObject:expires forKey:@"expiresDate"]; -+ } - [cookies setObject:d forKey:c.name]; - } - }