views:

34

answers:

1

Hi,

I need to manage server sessions in iPhone. As I researched there are many ways. One way is to use the apple native method calls by make use of the NSURLConnection and NSHTTPCookieStorage classes. However using the 3rd party libraries like ASIHttpRequest can also be helpful cos it already has implemented the above scenarios. So what will be the best approach for me to maintain the server session in my iPhone. I need to track the following,

1) Login, Logout mechanisms in server.

2) Sever session timeout.

Also does this cookie work as a normal browser cookie? Does it get invalidated after the life time of cookie has expired?

Regards,

Dilshan

+1  A: 

Well, the best approach is the one which works best for you.

I like ASIHTTPRequest, personally. It can be setup to use the global cookie store for session management.

Your server-side code will have some ramifications here, as well. So bear that in mind with things like your timeouts, etc.

Genericrich
Thanks for your reply. Yes I also agree I integrated ASIHTTPRequest recently and it worked fine and managed my server session very well.
Dilshan