views:

71

answers:

2

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 this might be out of the question. Or does it not matter at all?

+2  A: 

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

Kendall Helmstetter Gelner
A: 

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

Suriya
Why would you not use CFPreferences then?
Rudiger