Handling log-in / log-out via Objective-c

Posted by squeezemylime on Stack Overflow See other posts from Stack Overflow or by squeezemylime
Published on 2010-06-12T21:07:58Z Indexed on 2010/06/12 21:12 UTC
Read the original article Hit count: 280

Filed under:
|
|
|

Having a real problem with this one...Tried using cookies to store variables, etc. but no luck.

Writing an iPhone app where the User has to log in. There is an HTTPS call to get the person's userid, which is used practically everywhere else in the app, so that either has to be stored in a global variable or a cookie (for sending messages to other users, etc.)

I tried the cookie route, but am having great difficulty storing (and retriving) a user ID in a cookie.

The User should be able to then close out of the app and then reboot it and have the app retain their User ID as well, so I'm not sure global variables are necessarily the solution to this.

Are there any best practices or suggestions?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cookies