开发者

how to create session (iPhone)?

开发者 https://www.devze.com 2023-01-19 14:46 出处:网络
How do you log the use开发者_运维技巧r in, create and store the user\'s session? (It will timeout on its own aswell? do you need to store it in a database?)Use NSUserDefaults. Set their values when s

How do you log the use开发者_运维技巧r in, create and store the user's session?

(It will timeout on its own aswell? do you need to store it in a database?)


Use NSUserDefaults. Set their values when session starts [for some events like login etc] and erase them when you want to end the session [for the events like logout or timeout].


if you need to hard store login data (Username/password) you shouldn't use NSUserDefaults. Keychain was created to do this (SFHFKeychainUnit).

0

精彩评论

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