views:

10

answers:

0

Hi,

I have a simple application which accesses cookies from a webpage using a standard NSURLConnection. The existing version of the application works fine (developed for 3.0), however, I have modified the app (making it fully iOS4 compatible) and I now recieve the following warning in the log:

CFHTTPCookieGetCreateDate is deprecated in this OS build. Clients must call CFHTTPCookieGetCreationTime or the NS equivalent instead or risk leaks.

The application still works fine, but I'm concerned about "leaks", any ideas??? I can't find "CFHTTPCookieGetCreateDate" in my application!

I think the issue occurs in:

- (void) connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
self.responseData = [NSMutableData data];

// information returned from the cookie
NSDictionary *headerFields = [(NSHTTPURLResponse*)response allHeaderFields]; 
NSURL *url = [NSURL URLWithString:urlString];

//Cookies Array 
cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:headerFields forURL:url];

headerPointsTotal = [[NSString alloc] initWithFormat:@"%@", [cookies objectAtIndex:2]];

}

Thanks,