So, NSUserDefaults is quite easy to use. But apparently, it is not too secure - there is no encryption. And of course the client wants the app prefs to be secure because it contains sensitive data.
But the Keychain is secure, though hard to code (apparently). So is there a way to easily convert NSUserDefaults code to Keychain code? In other words, I want to store app prefs within the Keychain. Or am I barking up the wrong tree?
Both of the below solutions are wrappers around KeyChain API. By using them in a NSUserDefaults category, you can have clean way to access and store passwords.
You can try the EMKeyChain library that wraps the keychain in a friendly manner. If you need to store passwords, it is as simple as NSUserDefaults.
There is a simple wrapper: Simple iPhone Keychain Code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With