开发者

Session Management in iPhone

开发者 https://www.devze.com 2023-01-19 18:54 出处:网络
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. How

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 开发者_如何学JAVAcan 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消