How to maintain session in iOS application?
The user inputs their username and password to log in the first time.
On subsequent requests, should I just send the username/pass with every HTTPS request made to the server or can I have our server send a cookie to the app and have the app send it back using NSURLConnect开发者_开发知识库ion or something?You can securely (encrypted) store the username and password, say in NSUserDefaults
, and have the app send the login info when requested.
Turns out this isn't that big of a deal. I was thinking of designing the app more from a web-based perspective, which turns out wasn't necessary.
精彩评论