0

In PHP, you manage the Session on the server... accessing any of the session properties there on the server along side your web application.

How does this translate to an iPhone App? If I'm connection to web services (PHP, ColdFusion), where should I be managing sessions? Or does it work differently in this scenario?

dcolumbus
  • 9,596
  • 26
  • 100
  • 165

1 Answers1

0

Assuming your PHP code use cookies to track the active session (as opposed to, say, a session id request parameter), NSURLConnection handles cookies for you without any extra work, and it should work the same way it does inside a browser.

alex_c
  • 2,058
  • 2
  • 26
  • 34
  • What are you using to identify the session client-side? My understanding of sessions is that a cookie is usually used to store the session ID client-side, with the session data stored on the server. The alternative is passing the session ID as a parameter with each request. – alex_c May 03 '11 at 14:54
  • you're right... technically it's a Cookie for the Session ID, but beyond that, it's all server-side. So you're saying I should store the session cookie on the iPhone and use that data to contact the server-side session? Is that the recommended approach? – dcolumbus May 03 '11 at 20:09