Preferred place to store username
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..
精彩评论