I'm having some weird issues with NSHTTPCookieStorage in my iPhone app. When I call the login action of my web service, the service sends back a cookie called "auth", as well as some other cookies.
When I register a user, I invoke a logout action on the server that deletes cookies. If I print the result of [cookie NSHTTPCookieStorage] before calling logout, I see the cookie as expected. After logging out, I see that the auth cookie no longer exists (as expected).
However, if I close the application and reload it, the auth cookie will return!
I'm not sure what is going on here. It is one thing if NSHTTPCookieStorage simply did not save cookies, but it seems that some of them are saved.
Does anyone know what is going on? Do I need to manage files manually? Is there a way to commit what is in NSHTTPCookieStorage to disk?
source share