Question

my problem that the below code:

 [[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie];

works fine with ios 5 but with ios6 cookies are not deleted and the web view still uses the same cookies setted before.

Does anyone has an idea about this issue?

Update

after killing the app , it works fine.

Was it helpful?

Solution

The problem was with this method which i used to make authentication:

- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge{


       [[challenge sender] useCredential:[NSURLCredential credentialWithUser:Username password:Password persistence:CredentialsPresistance]


forAuthenticationChallenge:challenge];
}

the "persistence" ought to be equal to NSURLCredentialPersistenceNone in ios6 only.

This solved my problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top