diff --git a/native_modules/RNCookieManagerIOS.m b/native_modules/RNCookieManagerIOS.m index dfd067ef7..7feff14b0 100644 --- a/native_modules/RNCookieManagerIOS.m +++ b/native_modules/RNCookieManagerIOS.m @@ -174,16 +174,7 @@ RCT_EXPORT_METHOD( 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); }]; diff --git a/package-lock.json b/package-lock.json index eeb2be300..f84d9c2d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mattermost-mobile", - "version": "1.22.1", + "version": "1.23.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 50531cef6..4a81cf640 100644 --- a/package.json +++ b/package.json @@ -147,4 +147,4 @@ "node_modules/(?!react-native|jail-monkey)" ] } -} \ No newline at end of file +}