I have a cookie stored up manually NSHTTPCookieStorage and whenever I want to read the cookie value I iterate all the cookies from Cookiestorage and find my cookie and read it.
NSHTTPCookieStorage *cookieJar = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for(NSHTTPCookie *cookie in [cookieJar cookies]{
if([cookie.name isEqualToString:@"mycookie"] && [cookie.domain isEqualToString:@"mydomain.com"]{
return cookie.value;
}
}
return nil;
the problem is sometime I am not able to read my cookie value. will the cookie get removed automatically from sharedHTTPCookieStorage when the cookie expires
Please clarify