I'm building a Reddit client, for the iPad and the iPhone. I know there's some other clients, but I have some really cool ideas for tabbed Reddit browsing :D
Anywho, I'm working on the back-end of the thing first, and was wondering what the best way to deal with my cookie would be. I'm using ASIFormDataRequest and ASIHTTPRequest to get the cookie and make the requests for stories, and user subreddits. My question is, how do I know when the cookie has expired and I'm not logged in anymore?
A stupid solution (In my opinion) would be to just log in again before making any sort of data request... but that seems, well, stupid.
Another solution would be to check specifically for different responses for different requests to Reddit and derive my logged-in status.
An even BETTER way, would be to somehow see if I have a cookie in the iPhone's cookie store that is associated with Reddit, and if I don't, log in. So, is there a way to do that?