开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜