开发者

How to maintain session in iOS application?

开发者 https://www.devze.com 2023-02-07 05:16 出处:网络
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

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.

0

精彩评论

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