开发者

Preferred place to store username

开发者 https://www.devze.com 2023-01-04 01:59 出处:网络
I am dealing with a single username and password in an App, I\'m storing the password in the keychain for security but where best to store the username? In NSUserDefaults, CFPreferences or is there a

I am dealing with a single username and password in an App, I'm storing the password in the keychain for security but where best to store the username? In NSUserDefaults, CFPreferences or is there a way to retrieve it out of the keychain along with the password.

Later on there might be two entries in the keychain so I think开发者_JS百科 this might be out of the question. Or does it not matter at all?


NSUserDefaults is a good place to store a username, which you can then use to look up a password from the keychain.


NSUserDefaults is the best way i prefer. You can also store it in plist..

0

精彩评论

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

关注公众号