how to access username/password application wide
I'm using the SFHFKeychainUtils which is a wrapper for Apple开发者_JS百科's Keychain. To query a password I need a username.
How can I access username application wide? Use a singleton? Other solutions?
Store the username (but not the password) in NSUserDefaults
. Or, if you only have one user/pass pair, then you can just look at the appropriate attribute of the Keychain item.
精彩评论