I'm writing an iPhone app. This app requires users to login on a remote web server which is using php + mysql. How can the server handle this? Using sessions? Cookies? unique IDs? Any link/code/tutorial on how to do this would be great.
Is Macro Better Than UIColor for Setting RGB Color?
1:Facebook iphone connection
- Get the webservice ready this is build up using php. Is anyone testing Mono-Touch? [closed]
- On login webservice call on account of successful authentication a return a random string keep it in a session variable in server side and save it in a plist or sqlite db. How to intercept text from the keyboard and format it before it show in the cell?
- After this every time you make a request call send a additional retrieved parameter check if both are equal then process the request in server side. Getting an iPhone app's product name at runtime?
- Check if the Http response code is not 200 if so then pop all the viewcontrollers and receive the app to login page(It means the seesion has expired or any another error.You must handle it appropriately if you read around various http response codes). declaring global variables in iPhone project
Unless you want to pass session identifiers or credentials in each request, it makes sense to use
NSURLRequest's inbuilt cookie support to either store the entire session, or to just store a session identifier which you then use on the server to lookup the actual session data..